clang  6.0.0svn
Functions
MSVC.cpp File Reference
#include "MSVC.h"
#include "CommonArgs.h"
#include "Darwin.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/Version.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/DriverDiagnostic.h"
#include "clang/Driver/Options.h"
#include "clang/Driver/SanitizerArgs.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Support/ConvertUTF.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
#include <cstdio>
Include dependency graph for MSVC.cpp:

Go to the source code of this file.

Functions

static bool getSystemRegistryString (const char *keyPath, const char *valueName, std::string &value, std::string *phValue)
 Read registry string. More...
 
static bool findVCToolChainViaEnvironment (std::string &Path, MSVCToolChain::ToolsetLayout &VSLayout)
 
static bool findVCToolChainViaSetupConfig (std::string &Path, MSVCToolChain::ToolsetLayout &VSLayout)
 
static bool findVCToolChainViaRegistry (std::string &Path, MSVCToolChain::ToolsetLayout &VSLayout)
 
static std::string FindVisualStudioExecutable (const ToolChain &TC, const char *Exe)
 
static const char * llvmArchToWindowsSDKArch (llvm::Triple::ArchType Arch)
 
static const char * llvmArchToLegacyVCArch (llvm::Triple::ArchType Arch)
 
static const char * llvmArchToDevDivInternalArch (llvm::Triple::ArchType Arch)
 
static bool getWindows10SDKVersionFromPath (const std::string &SDKPath, std::string &SDKVersion)
 
static bool getWindowsSDKDir (std::string &Path, int &Major, std::string &WindowsSDKIncludeVersion, std::string &WindowsSDKLibVersion)
 Get Windows SDK installation directory. More...
 
static bool getUniversalCRTSdkDir (std::string &Path, std::string &UCRTVersion)
 
static VersionTuple getMSVCVersionFromTriple (const llvm::Triple &Triple)
 
static VersionTuple getMSVCVersionFromExe (const std::string &BinDir)
 
static void TranslateOptArg (Arg *A, llvm::opt::DerivedArgList &DAL, bool SupportsForcingFramePointer, const char *ExpandChar, const OptTable &Opts)
 
static void TranslateDArg (Arg *A, llvm::opt::DerivedArgList &DAL, const OptTable &Opts)
 

Function Documentation

◆ findVCToolChainViaEnvironment()

static bool findVCToolChainViaEnvironment ( std::string &  Path,
MSVCToolChain::ToolsetLayout VSLayout 
)
static

◆ findVCToolChainViaRegistry()

static bool findVCToolChainViaRegistry ( std::string &  Path,
MSVCToolChain::ToolsetLayout VSLayout 
)
static

◆ findVCToolChainViaSetupConfig()

static bool findVCToolChainViaSetupConfig ( std::string &  Path,
MSVCToolChain::ToolsetLayout VSLayout 
)
static

◆ FindVisualStudioExecutable()

static std::string FindVisualStudioExecutable ( const ToolChain TC,
const char *  Exe 
)
static

Definition at line 305 of file MSVC.cpp.

Referenced by clang::driver::tools::visualstudio::Compiler::GetCommand().

◆ getMSVCVersionFromExe()

static VersionTuple getMSVCVersionFromExe ( const std::string &  BinDir)
static

◆ getMSVCVersionFromTriple()

static VersionTuple getMSVCVersionFromTriple ( const llvm::Triple &  Triple)
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 880 of file MSVC.cpp.

References clang::isDigit(), and NULL.

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

◆ getUniversalCRTSdkDir()

static bool getUniversalCRTSdkDir ( std::string &  Path,
std::string &  UCRTVersion 
)
static

◆ getWindows10SDKVersionFromPath()

static bool getWindows10SDKVersionFromPath ( const std::string &  SDKPath,
std::string &  SDKVersion 
)
static

Definition at line 971 of file MSVC.cpp.

Referenced by getUniversalCRTSdkDir(), and getWindowsSDKDir().

◆ getWindowsSDKDir()

static bool getWindowsSDKDir ( std::string &  Path,
int &  Major,
std::string &  WindowsSDKIncludeVersion,
std::string &  WindowsSDKLibVersion 
)
static

◆ llvmArchToDevDivInternalArch()

static const char* llvmArchToDevDivInternalArch ( llvm::Triple::ArchType  Arch)
static

◆ llvmArchToLegacyVCArch()

static const char* llvmArchToLegacyVCArch ( llvm::Triple::ArchType  Arch)
static

◆ llvmArchToWindowsSDKArch()

static const char* llvmArchToWindowsSDKArch ( llvm::Triple::ArchType  Arch)
static

◆ TranslateDArg()

static void TranslateDArg ( Arg *  A,
llvm::opt::DerivedArgList &  DAL,
const OptTable &  Opts 
)
static

Definition at line 1399 of file MSVC.cpp.

◆ TranslateOptArg()

static void TranslateOptArg ( Arg *  A,
llvm::opt::DerivedArgList &  DAL,
bool  SupportsForcingFramePointer,
const char *  ExpandChar,
const OptTable &  Opts 
)
static

Definition at line 1304 of file MSVC.cpp.