class MSVCToolChain
Declaration
class MSVCToolChain : public ToolChain { /* full declaration omitted */ };Description
ToolChain - Access to tools for a single platform.
Declared at: clang/lib/Driver/ToolChains/MSVC.h:44
Inherits from: ToolChain
Member Variables
- private llvm::Optional<llvm::StringRef> WinSdkDir
- private llvm::Optional<llvm::StringRef> WinSdkVersion
- private llvm::Optional<llvm::StringRef> WinSysRoot
- private std::string VCToolChainPath
- private llvm::ToolsetLayout VSLayout = llvm::ToolsetLayout::OlderVS
- private clang::driver::CudaInstallationDetector CudaInstallation
- private clang::driver::RocmInstallationDetector RocmInstallation
Inherited from ToolChain:
Method Overview
- public void AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList & DriverArgs, llvm::opt::ArgStringList & CC1Args) const
- public void AddClangSystemIncludeArgs(const llvm::opt::ArgList & DriverArgs, llvm::opt::ArgStringList & CC1Args) const
- public void AddCudaIncludeArgs(const llvm::opt::ArgList & DriverArgs, llvm::opt::ArgStringList & CC1Args) const
- public void AddHIPIncludeArgs(const llvm::opt::ArgList & DriverArgs, llvm::opt::ArgStringList & CC1Args) const
- public void AddHIPRuntimeLibArgs(const llvm::opt::ArgList & Args, llvm::opt::ArgStringList & CmdArgs) const
- protected void AddSystemIncludeWithSubfolder(const llvm::opt::ArgList & DriverArgs, llvm::opt::ArgStringList & CC1Args, const std::string & folder, const llvm::Twine & subfolder1, const llvm::Twine & subfolder2 = "", const llvm::Twine & subfolder3 = "") const
- public std::string ComputeEffectiveClangTriple(const llvm::opt::ArgList & Args, types::ID InputType) const
- public bool FoundMSVCInstall() const
- public unsigned int GetDefaultDwarfVersion() const
- public bool IsIntegratedAssemblerDefault() const
- public bool IsUnwindTablesDefault(const llvm::opt::ArgList & Args) const
- public MSVCToolChain(const clang::driver::Driver & D, const llvm::Triple & Triple, const llvm::opt::ArgList & Args)
- public llvm::opt::DerivedArgList * TranslateArgs(const llvm::opt::DerivedArgList & Args, llvm::StringRef BoundArch, Action::OffloadKind DeviceOffloadKind) const
- public void addClangTargetOptions(const llvm::opt::ArgList & DriverArgs, llvm::opt::ArgStringList & CC1Args, Action::OffloadKind DeviceOffloadKind) const
- protected clang::driver::Tool * buildAssembler() const
- protected clang::driver::Tool * buildLinker() const
- public llvm::VersionTuple computeMSVCVersion(const clang::driver::Driver * D, const llvm::opt::ArgList & Args) const
- public codegenoptions::DebugInfoFormat getDefaultDebugFormat() const
- public llvm::DebuggerKind getDefaultDebuggerTuning() const
- public bool getIsVS2017OrNewer() const
- public std::string getSubDirectoryPath(llvm::SubDirectoryType Type, llvm::StringRef SubdirParent = "") const
- public std::string getSubDirectoryPath(llvm::SubDirectoryType Type, llvm::Triple::ArchType TargetArch) const
- public clang::SanitizerMask getSupportedSanitizers() const
- public bool getUniversalCRTLibraryPath(const llvm::opt::ArgList & Args, std::string & path) const
- public bool getWindowsSDKLibraryPath(const llvm::opt::ArgList & Args, std::string & path) const
- public bool isPICDefault() const
- public bool isPICDefaultForced() const
- public bool isPIEDefault(const llvm::opt::ArgList & Args) const
- public void printVerboseInfo(llvm::raw_ostream & OS) const
- public bool useUniversalCRT() const
Inherited from ToolChain:
- public AddCCKextLibArgs
- public AddCXXStdlibLibArgs
- public AddClangCXXStdlibIncludeArgs
- public AddClangCXXStdlibIsystemArgs
- public AddClangSystemIncludeArgs
- public AddCudaIncludeArgs
- public AddFilePathLibArgs
- public AddHIPIncludeArgs
- public AddHIPRuntimeLibArgs
- public AddIAMCUIncludeArgs
- public CheckObjCARC
- public ComputeEffectiveClangTriple
- public ComputeLLVMTriple
- public GetCXXStdlibType
- public GetDefaultCXXStdlibType
- public GetDefaultDwarfVersion
- public GetDefaultRuntimeLibType
- public GetDefaultStackProtectorLevel
- public GetDefaultStandaloneDebug
- public GetDefaultTrivialAutoVarInit
- public GetDefaultUnwindLibType
- public GetExceptionModel
- public GetFilePath
- public GetGlobalDebugPathRemapping
- public GetLinkerPath
- public GetProgramPath
- public GetRuntimeLibType
- public GetStaticLibToolPath
- public GetUnwindLibType
- public HasNativeLLVMSupport
- public IsAArch64OutlineAtomicsDefault
- public IsBlocksDefault
- public IsEncodeExtendedBlockSignatureDefault
- public IsIntegratedAssemblerDefault
- public IsIntegratedBackendDefault
- public IsIntegratedBackendSupported
- public IsMathErrnoDefault
- public IsNonIntegratedBackendSupported
- public IsObjCNonFragileABIDefault
- public IsUnwindTablesDefault
- public LookupTypeForExtension
- public SelectTool
- public ShouldLinkCXXStdlib
- public SupportsEmbeddedBitcode
- public SupportsProfiling
- public TranslateArgs
- public TranslateOpenMPTargetArgs
- public TranslateXarchArgs
- public TranslateXarchArgs
- public UseDwarfDebugFlags
- public UseObjCMixedDispatch
- public addClangTargetOptions
- public addClangWarningOptions
- protected addExternCSystemInclude
- protected addExternCSystemIncludeIfExists
- public addFastMathRuntimeIfAvailable
- public addProfileRTLibs
- protected addSystemInclude
- protected addSystemIncludes
- public adjustDebugInfoKind
- protected buildAssembler
- protected buildCompilerRTBasename
- protected buildLinker
- protected buildStaticLibTool
- public canSplitThinLTOUnit
- public computeMSVCVersion
- public computeSysRoot
- protected concat
- public defaultToIEEELongDouble
- public detectLibcxxVersion
- public getArch
- public getArchName
- public getArchSpecificLibPath
- public getAuxTriple
- public getCompilerRT
- public getCompilerRTArgString
- public getCompilerRTBasename
- public getCompilerRTPath
- public getDefaultDebugFormat
- public getDefaultDebuggerTuning
- public getDefaultDenormalModeForType
- public getDefaultLinker
- public getDefaultObjCRuntime
- public getDefaultSanitizers
- public getDefaultUniversalArchName
- public getDriver
- public getEffectiveTriple
- public getFilePaths
- public getFilePaths
- public getHIPDeviceLibs
- public getInputFilename
- public getLibraryPaths
- public getLibraryPaths
- public getMaxDwarfVersion
- public getMultiarchTriple
- public getMultilib
- public getMultilibs
- public getOS
- public getOSLibName
- public getOpenMPTriple
- public getPlatform
- public getProgramPaths
- public getProgramPaths
- public getRTTIArg
- public getRTTIMode
- public getRuntimePaths
- public getSanitizerArgs
- public getStdlibPaths
- public getSupportedSanitizers
- public getTargetAndModeFromProgramName
- public getTargetVariantTriple
- public getThreadModel
- protected getTool
- public getTriple
- public getTripleString
- public getVFS
- public getXRayArgs
- public hasBlocksRuntime
- public isCrossCompiling
- public isFastMathRuntimeAvailable
- public isPICDefault
- public isPICDefaultForced
- public isPIEDefault
- public isThreadModelSupported
- public needsGCovInstrumentation
- public needsProfileRT
- public parseInlineAsmUsingAsmParser
- public printVerboseInfo
- protected setTripleEnvironment
- public supportsDebugInfoOption
- public useIntegratedAs
- public useIntegratedBackend
- public useRelaxRelocations
Methods
¶void AddClangCXXStdlibIncludeArgs(
const llvm::opt::ArgList& DriverArgs,
llvm::opt::ArgStringList& CC1Args) const
void AddClangCXXStdlibIncludeArgs(
const llvm::opt::ArgList& DriverArgs,
llvm::opt::ArgStringList& CC1Args) constDescription
AddClangCXXStdlibIncludeArgs - Add the clang -cc1 level arguments to set the include paths to use for the given C++ standard library type.
Declared at: clang/lib/Driver/ToolChains/MSVC.h:89
Parameters
- const llvm::opt::ArgList& DriverArgs
- llvm::opt::ArgStringList& CC1Args
¶void AddClangSystemIncludeArgs(
const llvm::opt::ArgList& DriverArgs,
llvm::opt::ArgStringList& CC1Args) const
void AddClangSystemIncludeArgs(
const llvm::opt::ArgList& DriverArgs,
llvm::opt::ArgStringList& CC1Args) constDescription
Add the clang cc1 arguments for system include paths. This routine is responsible for adding the necessary cc1 arguments to include headers from standard system header directories.
Declared at: clang/lib/Driver/ToolChains/MSVC.h:87
Parameters
- const llvm::opt::ArgList& DriverArgs
- llvm::opt::ArgStringList& CC1Args
¶void AddCudaIncludeArgs(
const llvm::opt::ArgList& DriverArgs,
llvm::opt::ArgStringList& CC1Args) const
void AddCudaIncludeArgs(
const llvm::opt::ArgList& DriverArgs,
llvm::opt::ArgStringList& CC1Args) constDescription
Add arguments to use system-specific CUDA includes.
Declared at: clang/lib/Driver/ToolChains/MSVC.h:93
Parameters
- const llvm::opt::ArgList& DriverArgs
- llvm::opt::ArgStringList& CC1Args
¶void AddHIPIncludeArgs(
const llvm::opt::ArgList& DriverArgs,
llvm::opt::ArgStringList& CC1Args) const
void AddHIPIncludeArgs(
const llvm::opt::ArgList& DriverArgs,
llvm::opt::ArgStringList& CC1Args) constDescription
Add arguments to use system-specific HIP includes.
Declared at: clang/lib/Driver/ToolChains/MSVC.h:96
Parameters
- const llvm::opt::ArgList& DriverArgs
- llvm::opt::ArgStringList& CC1Args
¶void AddHIPRuntimeLibArgs(
const llvm::opt::ArgList& Args,
llvm::opt::ArgStringList& CmdArgs) const
void AddHIPRuntimeLibArgs(
const llvm::opt::ArgList& Args,
llvm::opt::ArgStringList& CmdArgs) constDescription
Add the system specific linker arguments to use for the given HIP runtime library type.
Declared at: clang/lib/Driver/ToolChains/MSVC.h:99
Parameters
- const llvm::opt::ArgList& Args
- llvm::opt::ArgStringList& CmdArgs
¶void AddSystemIncludeWithSubfolder(
const llvm::opt::ArgList& DriverArgs,
llvm::opt::ArgStringList& CC1Args,
const std::string& folder,
const llvm::Twine& subfolder1,
const llvm::Twine& subfolder2 = "",
const llvm::Twine& subfolder3 = "") const
void AddSystemIncludeWithSubfolder(
const llvm::opt::ArgList& DriverArgs,
llvm::opt::ArgStringList& CC1Args,
const std::string& folder,
const llvm::Twine& subfolder1,
const llvm::Twine& subfolder2 = "",
const llvm::Twine& subfolder3 = "") constDeclared at: clang/lib/Driver/ToolChains/MSVC.h:125
Parameters
- const llvm::opt::ArgList& DriverArgs
- llvm::opt::ArgStringList& CC1Args
- const std::string& folder
- const llvm::Twine& subfolder1
- const llvm::Twine& subfolder2 = ""
- const llvm::Twine& subfolder3 = ""
¶std::string ComputeEffectiveClangTriple(
const llvm::opt::ArgList& Args,
types::ID InputType) const
std::string ComputeEffectiveClangTriple(
const llvm::opt::ArgList& Args,
types::ID InputType) constDescription
ComputeEffectiveClangTriple - Return the Clang triple to use for this target, which may take into account the command line arguments. For example, on Darwin the -mmacosx-version-min= command line argument (which sets the deployment target) determines the version in the triple passed to Clang.
Declared at: clang/lib/Driver/ToolChains/MSVC.h:111
Parameters
- const llvm::opt::ArgList& Args
- types::ID InputType
¶bool FoundMSVCInstall() const
bool FoundMSVCInstall() constDeclared at: clang/lib/Driver/ToolChains/MSVC.h:117
¶unsigned int GetDefaultDwarfVersion() const
unsigned int GetDefaultDwarfVersion() constDeclared at: clang/lib/Driver/ToolChains/MSVC.h:73
¶bool IsIntegratedAssemblerDefault() const
bool IsIntegratedAssemblerDefault() constDescription
IsIntegratedAssemblerDefault - Does this tool chain enable -integrated-as by default.
Declared at: clang/lib/Driver/ToolChains/MSVC.h:53
¶bool IsUnwindTablesDefault(
const llvm::opt::ArgList& Args) const
bool IsUnwindTablesDefault(
const llvm::opt::ArgList& Args) constDescription
IsUnwindTablesDefault - Does this tool chain use -funwind-tables by default.
Declared at: clang/lib/Driver/ToolChains/MSVC.h:54
Parameters
- const llvm::opt::ArgList& Args
¶MSVCToolChain(const clang::driver::Driver& D,
const llvm::Triple& Triple,
const llvm::opt::ArgList& Args)
MSVCToolChain(const clang::driver::Driver& D,
const llvm::Triple& Triple,
const llvm::opt::ArgList& Args)Declared at: clang/lib/Driver/ToolChains/MSVC.h:46
Parameters
- const clang::driver::Driver& D
- const llvm::Triple& Triple
- const llvm::opt::ArgList& Args
¶llvm::opt::DerivedArgList* TranslateArgs(
const llvm::opt::DerivedArgList& Args,
llvm::StringRef BoundArch,
Action::OffloadKind DeviceOffloadKind) const
llvm::opt::DerivedArgList* TranslateArgs(
const llvm::opt::DerivedArgList& Args,
llvm::StringRef BoundArch,
Action::OffloadKind DeviceOffloadKind) constDescription
TranslateArgs - Create a new derived argument list for any argument translations this ToolChain may wish to perform, or 0 if no tool chain specific translations are needed. If \p DeviceOffloadKind is specified the translation specific for that offload kind is performed.
Declared at: clang/lib/Driver/ToolChains/MSVC.h:50
Parameters
- const llvm::opt::DerivedArgList& Args
- llvm::StringRef BoundArch
- - The bound architecture name, or 0.
- Action::OffloadKind DeviceOffloadKind
- - The device offload kind used for the translation.
¶void addClangTargetOptions(
const llvm::opt::ArgList& DriverArgs,
llvm::opt::ArgStringList& CC1Args,
Action::OffloadKind DeviceOffloadKind) const
void addClangTargetOptions(
const llvm::opt::ArgList& DriverArgs,
llvm::opt::ArgStringList& CC1Args,
Action::OffloadKind DeviceOffloadKind) constDescription
Add options that need to be passed to cc1 for this target.
Declared at: clang/lib/Driver/ToolChains/MSVC.h:120
Parameters
- const llvm::opt::ArgList& DriverArgs
- llvm::opt::ArgStringList& CC1Args
- Action::OffloadKind DeviceOffloadKind
¶clang::driver::Tool* buildAssembler() const
clang::driver::Tool* buildAssembler() constDeclared at: clang/lib/Driver/ToolChains/MSVC.h:133
¶clang::driver::Tool* buildLinker() const
clang::driver::Tool* buildLinker() constDeclared at: clang/lib/Driver/ToolChains/MSVC.h:132
¶llvm::VersionTuple computeMSVCVersion(
const clang::driver::Driver* D,
const llvm::opt::ArgList& Args) const
llvm::VersionTuple computeMSVCVersion(
const clang::driver::Driver* D,
const llvm::opt::ArgList& Args) constDescription
On Windows, returns the MSVC compatibility version.
Declared at: clang/lib/Driver/ToolChains/MSVC.h:108
Parameters
- const clang::driver::Driver* D
- const llvm::opt::ArgList& Args
¶codegenoptions::DebugInfoFormat
getDefaultDebugFormat() const
codegenoptions::DebugInfoFormat
getDefaultDebugFormat() constDescription
Set CodeView as the default debug info format for non-MachO binary formats, and to DWARF otherwise. Users can use -gcodeview and -gdwarf to override the default.
Declared at: clang/lib/Driver/ToolChains/MSVC.h:62
¶llvm::DebuggerKind getDefaultDebuggerTuning()
const
llvm::DebuggerKind getDefaultDebuggerTuning()
constDescription
Set the debugger tuning to "default", since we're definitely not tuning for GDB.
Declared at: clang/lib/Driver/ToolChains/MSVC.h:69
¶bool getIsVS2017OrNewer() const
bool getIsVS2017OrNewer() constDeclared at: clang/lib/Driver/ToolChains/MSVC.h:82
¶std::string getSubDirectoryPath(
llvm::SubDirectoryType Type,
llvm::StringRef SubdirParent = "") const
std::string getSubDirectoryPath(
llvm::SubDirectoryType Type,
llvm::StringRef SubdirParent = "") constDeclared at: clang/lib/Driver/ToolChains/MSVC.h:77
Parameters
- llvm::SubDirectoryType Type
- llvm::StringRef SubdirParent = ""
¶std::string getSubDirectoryPath(
llvm::SubDirectoryType Type,
llvm::Triple::ArchType TargetArch) const
std::string getSubDirectoryPath(
llvm::SubDirectoryType Type,
llvm::Triple::ArchType TargetArch) constDeclared at: clang/lib/Driver/ToolChains/MSVC.h:79
Parameters
- llvm::SubDirectoryType Type
- llvm::Triple::ArchType TargetArch
¶clang::SanitizerMask getSupportedSanitizers()
const
clang::SanitizerMask getSupportedSanitizers()
constDescription
Return sanitizers which are available in this toolchain.
Declared at: clang/lib/Driver/ToolChains/MSVC.h:113
¶bool getUniversalCRTLibraryPath(
const llvm::opt::ArgList& Args,
std::string& path) const
bool getUniversalCRTLibraryPath(
const llvm::opt::ArgList& Args,
std::string& path) constDeclared at: clang/lib/Driver/ToolChains/MSVC.h:104
Parameters
- const llvm::opt::ArgList& Args
- std::string& path
¶bool getWindowsSDKLibraryPath(
const llvm::opt::ArgList& Args,
std::string& path) const
bool getWindowsSDKLibraryPath(
const llvm::opt::ArgList& Args,
std::string& path) constDeclared at: clang/lib/Driver/ToolChains/MSVC.h:102
Parameters
- const llvm::opt::ArgList& Args
- std::string& path
¶bool isPICDefault() const
bool isPICDefault() constDescription
Test whether this toolchain defaults to PIC.
Declared at: clang/lib/Driver/ToolChains/MSVC.h:55
¶bool isPICDefaultForced() const
bool isPICDefaultForced() constDescription
Tests whether this toolchain forces its default for PIC, PIE or non-PIC. If this returns true, any PIC related flags should be ignored and instead the results of \c isPICDefault() and \c isPIEDefault(const llvm::opt::ArgList &Args ) are used exclusively.
Declared at: clang/lib/Driver/ToolChains/MSVC.h:57
¶bool isPIEDefault(
const llvm::opt::ArgList& Args) const
bool isPIEDefault(
const llvm::opt::ArgList& Args) constDescription
Test whether this toolchain defaults to PIE.
Declared at: clang/lib/Driver/ToolChains/MSVC.h:56
Parameters
- const llvm::opt::ArgList& Args
¶void printVerboseInfo(llvm::raw_ostream& OS) const
void printVerboseInfo(llvm::raw_ostream& OS) constDescription
Dispatch to the specific toolchain for verbose printing. This is used when handling the verbose option to print detailed, toolchain-specific information useful for understanding the behavior of the driver on a specific platform.
Declared at: clang/lib/Driver/ToolChains/MSVC.h:115
Parameters
¶bool useUniversalCRT() const
bool useUniversalCRT() constDeclared at: clang/lib/Driver/ToolChains/MSVC.h:106