LLVM 22.0.0git
MSVCPaths.cpp File Reference

Go to the source code of this file.

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, std::optional< llvm::StringRef > WinSdkDir, std::optional< llvm::StringRef > WinSdkVersion, std::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.

Function Documentation

◆ getHighestNumericTupleInDirectory()

◆ getSystemRegistryString()

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 175 of file MSVCPaths.cpp.

References llvm::isDigit().

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

◆ getWindows10SDKVersionFromPath()

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

◆ getWindowsSDKDirViaCommandLine()

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