LLVM  15.0.0git
Namespaces | Functions
MSVCPaths.cpp File Reference
#include "llvm/WindowsDriver/MSVCPaths.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/VersionTuple.h"
#include "llvm/Support/VirtualFileSystem.h"
#include <string>
Include dependency graph for MSVCPaths.cpp:

Go to the source code of this file.

Namespaces

 llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Functions

static std::string getHighestNumericTupleInDirectory (llvm::vfs::FileSystem &VFS, llvm::StringRef Directory)
 
static bool getWindows10SDKVersionFromPath (llvm::vfs::FileSystem &VFS, const std::string &SDKPath, std::string &SDKVersion)
 
static bool getWindowsSDKDirViaCommandLine (llvm::vfs::FileSystem &VFS, llvm::Optional< llvm::StringRef > WinSdkDir, llvm::Optional< llvm::StringRef > WinSdkVersion, llvm::Optional< llvm::StringRef > WinSysRoot, std::string &Path, int &Major, std::string &Version)
 
static bool getSystemRegistryString (const char *keyPath, const char *valueName, std::string &value, std::string *phValue)
 Read registry string. More...
 
const char * llvm::archToWindowsSDKArch (llvm::Triple::ArchType Arch)
 
const char * llvm::archToLegacyVCArch (llvm::Triple::ArchType Arch)
 
const char * llvm::archToDevDivInternalArch (llvm::Triple::ArchType Arch)
 
bool llvm::appendArchToWindowsSDKLibPath (int SDKMajor, llvm::SmallString< 128 > LibPath, llvm::Triple::ArchType Arch, std::string &path)
 
std::string llvm::getSubDirectoryPath (SubDirectoryType Type, ToolsetLayout VSLayout, const std::string &VCToolChainPath, llvm::Triple::ArchType TargetArch, llvm::StringRef SubdirParent="")
 
bool llvm::useUniversalCRT (ToolsetLayout VSLayout, const std::string &VCToolChainPath, llvm::Triple::ArchType TargetArch, llvm::vfs::FileSystem &VFS)
 
bool llvm::getWindowsSDKDir (vfs::FileSystem &VFS, llvm::Optional< llvm::StringRef > WinSdkDir, llvm::Optional< llvm::StringRef > WinSdkVersion, llvm::Optional< llvm::StringRef > WinSysRoot, std::string &Path, int &Major, std::string &WindowsSDKIncludeVersion, std::string &WindowsSDKLibVersion)
 Get Windows SDK installation directory. More...
 
bool llvm::getUniversalCRTSdkDir (vfs::FileSystem &VFS, llvm::Optional< llvm::StringRef > WinSdkDir, llvm::Optional< llvm::StringRef > WinSdkVersion, llvm::Optional< llvm::StringRef > WinSysRoot, std::string &Path, std::string &UCRTVersion)
 
bool llvm::findVCToolChainViaCommandLine (vfs::FileSystem &VFS, llvm::Optional< llvm::StringRef > VCToolsDir, llvm::Optional< llvm::StringRef > VCToolsVersion, llvm::Optional< llvm::StringRef > WinSysRoot, std::string &Path, ToolsetLayout &VSLayout)
 
bool llvm::findVCToolChainViaEnvironment (vfs::FileSystem &VFS, std::string &Path, ToolsetLayout &VSLayout)
 
bool llvm::findVCToolChainViaSetupConfig (vfs::FileSystem &VFS, std::string &Path, ToolsetLayout &VSLayout)
 
bool llvm::findVCToolChainViaRegistry (std::string &Path, ToolsetLayout &VSLayout)
 

Function Documentation

◆ getHighestNumericTupleInDirectory()

static std::string getHighestNumericTupleInDirectory ( llvm::vfs::FileSystem VFS,
llvm::StringRef  Directory 
)
static

◆ getSystemRegistryString()

static bool getSystemRegistryString ( const char *  keyPath,
const char *  valueName,
std::string &  value,
std::string *  phValue 
)
static

Read registry string.

This also supports a means to look for high-versioned keys by use of a $VERSION placeholder in the key path. $VERSION in the key path is a placeholder for the version number, causing the highest value path to be searched for and used. I.e. "SOFTWARE\\Microsoft\\VisualStudio\\$VERSION". There can be additional characters in the component. Only the numeric characters are compared. This function only searches HKLM.

Definition at line 174 of file MSVCPaths.cpp.

References llvm::AMDGPU::SDWA::DWORD, index, isDigit(), size, and sp.

Referenced by llvm::findVCToolChainViaRegistry(), llvm::getUniversalCRTSdkDir(), and llvm::getWindowsSDKDir().

◆ getWindows10SDKVersionFromPath()

static bool getWindows10SDKVersionFromPath ( llvm::vfs::FileSystem VFS,
const std::string &  SDKPath,
std::string &  SDKVersion 
)
static

◆ getWindowsSDKDirViaCommandLine()

static bool getWindowsSDKDirViaCommandLine ( llvm::vfs::FileSystem VFS,
llvm::Optional< llvm::StringRef WinSdkDir,
llvm::Optional< llvm::StringRef WinSdkVersion,
llvm::Optional< llvm::StringRef WinSysRoot,
std::string &  Path,
int Major,
std::string &  Version 
)
static