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:

protected Multilibs
protected SelectedMultilib

Method Overview

Inherited from ToolChain:

Methods

void AddClangCXXStdlibIncludeArgs(
    const llvm::opt::ArgList& DriverArgs,
    llvm::opt::ArgStringList& CC1Args) const

Description

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

Description

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

Description

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

Description

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

Description

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

Declared 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

Description

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

Declared at: clang/lib/Driver/ToolChains/MSVC.h:117

unsigned int GetDefaultDwarfVersion() const

Declared at: clang/lib/Driver/ToolChains/MSVC.h:73

bool IsIntegratedAssemblerDefault() const

Description

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

Description

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)

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

Description

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

Description

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

Declared at: clang/lib/Driver/ToolChains/MSVC.h:133

clang::driver::Tool* buildLinker() const

Declared at: clang/lib/Driver/ToolChains/MSVC.h:132

llvm::VersionTuple computeMSVCVersion(
    const clang::driver::Driver* D,
    const llvm::opt::ArgList& Args) const

Description

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

Description

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

Description

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

Declared at: clang/lib/Driver/ToolChains/MSVC.h:82

std::string getSubDirectoryPath(
    llvm::SubDirectoryType Type,
    llvm::StringRef SubdirParent = "") const

Declared 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

Declared at: clang/lib/Driver/ToolChains/MSVC.h:79

Parameters

llvm::SubDirectoryType Type
llvm::Triple::ArchType TargetArch

clang::SanitizerMask getSupportedSanitizers()
    const

Description

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

Declared 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

Declared at: clang/lib/Driver/ToolChains/MSVC.h:102

Parameters

const llvm::opt::ArgList& Args
std::string& path

bool isPICDefault() const

Description

Test whether this toolchain defaults to PIC.

Declared at: clang/lib/Driver/ToolChains/MSVC.h:55

bool isPICDefaultForced() const

Description

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

Description

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

Description

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

llvm::raw_ostream& OS

bool useUniversalCRT() const

Declared at: clang/lib/Driver/ToolChains/MSVC.h:106