clang API Documentation
#include "Tools.h"
#include "InputInfo.h"
#include "ToolChains.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/ObjCRuntime.h"
#include "clang/Basic/Version.h"
#include "clang/Driver/Action.h"
#include "clang/Driver/Compilation.h"
#include "clang/Driver/Driver.h"
#include "clang/Driver/DriverDiagnostic.h"
#include "clang/Driver/Job.h"
#include "clang/Driver/Options.h"
#include "clang/Driver/SanitizerArgs.h"
#include "clang/Driver/ToolChain.h"
#include "clang/Driver/Util.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/Option.h"
#include "llvm/Support/Compression.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/raw_ostream.h"
Go to the source code of this file.
Classes | |
struct | EHFlags |
Enumerations | |
enum | LibOpenMP { LibUnknown, LibGOMP, LibIOMP5 } |
Functions | |
static void | addAssemblerKPIC (const ArgList &Args, ArgStringList &CmdArgs) |
static void | CheckPreprocessingOptions (const Driver &D, const ArgList &Args) |
static void | CheckCodeGenerationOptions (const Driver &D, const ArgList &Args) |
static void | EscapeSpacesAndBackslashes (const char *Arg, SmallVectorImpl< char > &Res) |
static void | QuoteTarget (StringRef Target, SmallVectorImpl< char > &Res) |
static void | addDirectoryList (const ArgList &Args, ArgStringList &CmdArgs, const char *ArgName, const char *EnvVar) |
static void | AddLinkerInputs (const ToolChain &TC, const InputInfoList &Inputs, const ArgList &Args, ArgStringList &CmdArgs) |
static bool | isObjCAutoRefCount (const ArgList &Args) |
Determine whether Objective-C automated reference counting is enabled. | |
static bool | isObjCRuntimeLinked (const ArgList &Args) |
Determine whether we are linking the ObjC runtime. | |
static bool | forwardToGCC (const Option &O) |
static bool | isSignedCharDefault (const llvm::Triple &Triple) |
static bool | isNoCommonDefault (const llvm::Triple &Triple) |
static void | getARMHWDivFeatures (const Driver &D, const Arg *A, const ArgList &Args, std::vector< const char * > &Features) |
static void | getARMFPUFeatures (const Driver &D, const Arg *A, const ArgList &Args, std::vector< const char * > &Features) |
static void | getARMTargetFeatures (const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector< const char * > &Features, bool ForAS) |
static std::string | getAArch64TargetCPU (const ArgList &Args) |
static StringRef | getGnuCompatibleMipsABIName (StringRef ABI) |
static StringRef | getMipsFloatABI (const Driver &D, const ArgList &Args) |
static void | AddTargetFeature (const ArgList &Args, std::vector< const char * > &Features, OptSpecifier OnOpt, OptSpecifier OffOpt, StringRef FeatureName) |
static void | getMIPSTargetFeatures (const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector< const char * > &Features) |
static std::string | getPPCTargetCPU (const ArgList &Args) |
getPPCTargetCPU - Get the (LLVM) name of the PowerPC cpu we are targeting. | |
static void | getPPCTargetFeatures (const ArgList &Args, std::vector< const char * > &Features) |
static std::string | getR600TargetGPU (const ArgList &Args) |
Get the (LLVM) name of the R600 gpu we are targeting. | |
static void | getSparcTargetFeatures (const ArgList &Args, std::vector< const char * > &Features) |
static const char * | getSystemZTargetCPU (const ArgList &Args) |
static const char * | getX86TargetCPU (const ArgList &Args, const llvm::Triple &Triple) |
static std::string | getCPUName (const ArgList &Args, const llvm::Triple &T) |
static void | AddGoldPlugin (const ToolChain &ToolChain, const ArgList &Args, ArgStringList &CmdArgs) |
static void | getX86TargetFeatures (const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector< const char * > &Features) |
static bool | HasPICArg (const ArgList &Args) |
static Arg * | GetLastSmallDataThresholdArg (const ArgList &Args) |
static std::string | GetHexagonSmallDataThresholdValue (const ArgList &Args) |
static bool | DecodeAArch64Features (const Driver &D, StringRef text, std::vector< const char * > &Features) |
static bool | DecodeAArch64Mcpu (const Driver &D, StringRef Mcpu, StringRef &CPU, std::vector< const char * > &Features) |
static bool | getAArch64ArchFeaturesFromMarch (const Driver &D, StringRef March, const ArgList &Args, std::vector< const char * > &Features) |
static bool | getAArch64ArchFeaturesFromMcpu (const Driver &D, StringRef Mcpu, const ArgList &Args, std::vector< const char * > &Features) |
static bool | getAArch64MicroArchFeaturesFromMtune (const Driver &D, StringRef Mtune, const ArgList &Args, std::vector< const char * > &Features) |
static bool | getAArch64MicroArchFeaturesFromMcpu (const Driver &D, StringRef Mcpu, const ArgList &Args, std::vector< const char * > &Features) |
static void | getAArch64TargetFeatures (const Driver &D, const ArgList &Args, std::vector< const char * > &Features) |
static void | getTargetFeatures (const Driver &D, const llvm::Triple &Triple, const ArgList &Args, ArgStringList &CmdArgs, bool ForAS) |
static bool | shouldUseExceptionTablesForObjCExceptions (const ObjCRuntime &runtime, const llvm::Triple &Triple) |
static ExceptionSettings | exceptionSettings (const ArgList &Args, const llvm::Triple &Triple) |
static void | addExceptionArgs (const ArgList &Args, types::ID InputType, const llvm::Triple &Triple, bool KernelOrKext, const ObjCRuntime &objcRuntime, ArgStringList &CmdArgs) |
static bool | ShouldDisableAutolink (const ArgList &Args, const ToolChain &TC) |
static bool | ShouldDisableDwarfDirectory (const ArgList &Args, const ToolChain &TC) |
static bool | ContainsCompileAction (const Action *A) |
Check whether the given input tree contains any compilation actions. | |
static bool | UseRelaxAll (Compilation &C, const ArgList &Args) |
Check if -relax-all should be passed to the internal assembler. This is done by default when compiling non-assembler source with -O0. | |
static void | CollectArgsForIntegratedAssembler (Compilation &C, const ArgList &Args, ArgStringList &CmdArgs, const Driver &D) |
static StringRef | getArchNameForCompilerRTLib (const ToolChain &TC) |
static SmallString< 128 > | getCompilerRTLibDir (const ToolChain &TC) |
static void | addClangRTLinux (const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs) |
static void | addClangRTWindows (const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs) |
static void | addProfileRT (const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs) |
static SmallString< 128 > | getSanitizerRTLibName (const ToolChain &TC, StringRef Sanitizer, bool Shared) |
static void | addSanitizerRuntime (const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs, StringRef Sanitizer, bool IsShared) |
static bool | addSanitizerDynamicList (const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs, StringRef Sanitizer) |
static void | linkSanitizerRuntimeDeps (const ToolChain &TC, ArgStringList &CmdArgs) |
static void | collectSanitizerRuntimes (const ToolChain &TC, const ArgList &Args, SmallVectorImpl< StringRef > &SharedRuntimes, SmallVectorImpl< StringRef > &StaticRuntimes, SmallVectorImpl< StringRef > &HelperStaticRuntimes) |
static bool | addSanitizerRuntimes (const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs) |
static bool | shouldUseFramePointerForTarget (const ArgList &Args, const llvm::Triple &Triple) |
static bool | shouldUseFramePointer (const ArgList &Args, const llvm::Triple &Triple) |
static bool | shouldUseLeafFramePointer (const ArgList &Args, const llvm::Triple &Triple) |
static void | addDebugCompDirArg (const ArgList &Args, ArgStringList &CmdArgs) |
Add a CC1 option to specify the debug compilation directory. | |
static const char * | SplitDebugName (const ArgList &Args, const InputInfoList &Inputs) |
static void | SplitDebugInfo (const ToolChain &TC, Compilation &C, const Tool &T, const JobAction &JA, const ArgList &Args, const InputInfo &Output, const char *OutFile) |
static bool | shouldEnableVectorizerAtOLevel (const ArgList &Args, bool isSlpVec) |
Vectorize at all optimization levels greater than 1 except for -Oz. For -Oz the loop vectorizer is disable, while the slp vectorizer is enabled. | |
static void | addDashXForInput (const ArgList &Args, const InputInfo &Input, ArgStringList &CmdArgs) |
Add -x lang to CmdArgs for Input . | |
static std::string | getMSCompatibilityVersion (const char *VersionStr) |
static bool | maybeConsumeDash (const std::string &EH, size_t &I) |
static EHFlags | parseClangCLEHFlags (const Driver &D, const ArgList &Args) |
static void | AddLibgcc (const llvm::Triple &Triple, const Driver &D, ArgStringList &CmdArgs, const ArgList &Args) |
static std::string | getLinuxDynamicLinker (const ArgList &Args, const toolchains::Linux &ToolChain) |
static void | AddRunTimeLibs (const ToolChain &TC, const Driver &D, ArgStringList &CmdArgs, const ArgList &Args) |
static const char * | getLDMOption (const llvm::Triple &T, const ArgList &Args) |
static void | addSanitizerRTWindows (const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs, StringRef RTName) |
static std::string | FindVisualStudioExecutable (const ToolChain &TC, const char *Exe, const char *ClangProgramPath) |
static void addAssemblerKPIC | ( | const ArgList & | Args, |
ArgStringList & | CmdArgs | ||
) | [static] |
static void addClangRTLinux | ( | const ToolChain & | TC, |
const ArgList & | Args, | ||
ArgStringList & | CmdArgs | ||
) | [static] |
Definition at line 2153 of file Tools.cpp.
References clang::driver::Driver::CCCIsCXX(), getArchNameForCompilerRTLib(), getCompilerRTLibDir(), and clang::driver::ToolChain::getDriver().
Referenced by AddRunTimeLibs().
static void addClangRTWindows | ( | const ToolChain & | TC, |
const ArgList & | Args, | ||
ArgStringList & | CmdArgs | ||
) | [static] |
Definition at line 2166 of file Tools.cpp.
References getArchNameForCompilerRTLib(), and getCompilerRTLibDir().
Referenced by AddRunTimeLibs().
static void addDashXForInput | ( | const ArgList & | Args, |
const InputInfo & | Input, | ||
ArgStringList & | CmdArgs | ||
) | [static] |
Add -x lang to CmdArgs
for Input
.
Definition at line 2443 of file Tools.cpp.
References clang::driver::InputInfo::getType(), and clang::driver::types::getTypeName().
Referenced by clang::driver::tools::Clang::ConstructJob().
static void addDebugCompDirArg | ( | const ArgList & | Args, |
ArgStringList & | CmdArgs | ||
) | [static] |
Add a CC1 option to specify the debug compilation directory.
Definition at line 2359 of file Tools.cpp.
Referenced by clang::driver::tools::Clang::ConstructJob(), and clang::driver::tools::ClangAs::ConstructJob().
static void addDirectoryList | ( | const ArgList & | Args, |
ArgStringList & | CmdArgs, | ||
const char * | ArgName, | ||
const char * | EnvVar | ||
) | [static] |
Definition at line 132 of file Tools.cpp.
Referenced by AddLinkerInputs().
static void addExceptionArgs | ( | const ArgList & | Args, |
types::ID | InputType, | ||
const llvm::Triple & | Triple, | ||
bool | KernelOrKext, | ||
const ObjCRuntime & | objcRuntime, | ||
ArgStringList & | CmdArgs | ||
) | [static] |
addExceptionArgs - Adds exception related arguments to the driver command arguments. There's a master flag, -fexceptions and also language specific flags to enable/disable C++ and Objective-C exceptions. This makes it possible to for example disable C++ exceptions but enable Objective-C exceptions.
Definition at line 1953 of file Tools.cpp.
References exceptionSettings(), clang::driver::types::isCXX(), clang::driver::types::isObjC(), and shouldUseExceptionTablesForObjCExceptions().
Referenced by clang::driver::tools::Clang::ConstructJob().
static void AddGoldPlugin | ( | const ToolChain & | ToolChain, |
const ArgList & | Args, | ||
ArgStringList & | CmdArgs | ||
) | [static] |
Definition at line 1519 of file Tools.cpp.
References clang::driver::Driver::Dir, getCPUName(), clang::driver::ToolChain::getDriver(), and clang::driver::ToolChain::getTriple().
Referenced by clang::driver::tools::freebsd::Link::ConstructJob(), and clang::driver::tools::gnutools::Link::ConstructJob().
static void AddLibgcc | ( | const llvm::Triple & | Triple, |
const Driver & | D, | ||
ArgStringList & | CmdArgs, | ||
const ArgList & | Args | ||
) | [static] |
Definition at line 7203 of file Tools.cpp.
References clang::driver::Driver::CCCIsCXX().
Referenced by AddRunTimeLibs().
static void AddLinkerInputs | ( | const ToolChain & | TC, |
const InputInfoList & | Inputs, | ||
const ArgList & | Args, | ||
ArgStringList & | CmdArgs | ||
) | [static] |
Definition at line 187 of file Tools.cpp.
References clang::driver::ToolChain::AddCCKextLibArgs(), clang::driver::ToolChain::AddCXXStdlibLibArgs(), addDirectoryList(), clang::driver::Driver::Diag(), clang::driver::ToolChain::getDriver(), clang::driver::ToolChain::getTripleString(), clang::driver::ToolChain::HasNativeLLVMSupport(), and clang::driver::ToolChain::isCrossCompiling().
Referenced by clang::driver::tools::hexagon::Link::ConstructJob(), clang::driver::tools::darwin::Link::ConstructJob(), clang::driver::tools::openbsd::Link::ConstructJob(), clang::driver::tools::bitrig::Link::ConstructJob(), clang::driver::tools::freebsd::Link::ConstructJob(), clang::driver::tools::netbsd::Link::ConstructJob(), clang::driver::tools::gnutools::Link::ConstructJob(), clang::driver::tools::minix::Link::ConstructJob(), clang::driver::tools::solaris::Link::ConstructJob(), clang::driver::tools::dragonfly::Link::ConstructJob(), clang::driver::tools::XCore::Link::ConstructJob(), and clang::driver::tools::CrossWindows::Link::ConstructJob().
static void addProfileRT | ( | const ToolChain & | TC, |
const ArgList & | Args, | ||
ArgStringList & | CmdArgs | ||
) | [static] |
Definition at line 2174 of file Tools.cpp.
References getArchNameForCompilerRTLib(), and getCompilerRTLibDir().
Referenced by clang::driver::tools::freebsd::Link::ConstructJob(), clang::driver::tools::netbsd::Link::ConstructJob(), clang::driver::tools::gnutools::Link::ConstructJob(), clang::driver::tools::minix::Link::ConstructJob(), clang::driver::tools::solaris::Link::ConstructJob(), and clang::driver::tools::dragonfly::Link::ConstructJob().
static void AddRunTimeLibs | ( | const ToolChain & | TC, |
const Driver & | D, | ||
ArgStringList & | CmdArgs, | ||
const ArgList & | Args | ||
) | [static] |
Definition at line 7304 of file Tools.cpp.
References addClangRTLinux(), addClangRTWindows(), AddLibgcc(), clang::driver::ToolChain::GetRuntimeLibType(), clang::driver::ToolChain::getTriple(), clang::driver::ToolChain::RLT_CompilerRT, and clang::driver::ToolChain::RLT_Libgcc.
Referenced by clang::driver::tools::gnutools::Link::ConstructJob(), and clang::driver::tools::CrossWindows::Link::ConstructJob().
static bool addSanitizerDynamicList | ( | const ToolChain & | TC, |
const ArgList & | Args, | ||
ArgStringList & | CmdArgs, | ||
StringRef | Sanitizer | ||
) | [static] |
Definition at line 2222 of file Tools.cpp.
References getSanitizerRTLibName().
Referenced by addSanitizerRuntimes().
static void addSanitizerRTWindows | ( | const ToolChain & | TC, |
const ArgList & | Args, | ||
ArgStringList & | CmdArgs, | ||
StringRef | RTName | ||
) | [static] |
Definition at line 7832 of file Tools.cpp.
References getCompilerRTLibDir().
Referenced by clang::driver::tools::visualstudio::Link::ConstructJob().
static void addSanitizerRuntime | ( | const ToolChain & | TC, |
const ArgList & | Args, | ||
ArgStringList & | CmdArgs, | ||
StringRef | Sanitizer, | ||
bool | IsShared | ||
) | [static] |
Definition at line 2207 of file Tools.cpp.
References getSanitizerRTLibName().
Referenced by addSanitizerRuntimes().
static bool addSanitizerRuntimes | ( | const ToolChain & | TC, |
const ArgList & | Args, | ||
ArgStringList & | CmdArgs | ||
) | [static] |
Definition at line 2295 of file Tools.cpp.
References addSanitizerDynamicList(), addSanitizerRuntime(), and collectSanitizerRuntimes().
Referenced by clang::driver::tools::freebsd::Link::ConstructJob(), and clang::driver::tools::gnutools::Link::ConstructJob().
static void AddTargetFeature | ( | const ArgList & | Args, |
std::vector< const char * > & | Features, | ||
OptSpecifier | OnOpt, | ||
OptSpecifier | OffOpt, | ||
StringRef | FeatureName | ||
) | [static] |
Definition at line 1063 of file Tools.cpp.
Referenced by getMIPSTargetFeatures(), and getPPCTargetFeatures().
static void CheckCodeGenerationOptions | ( | const Driver & | D, |
const ArgList & | Args | ||
) | [static] |
CheckCodeGenerationOptions - Perform some validation of code generation arguments that is shared with gcc.
Definition at line 77 of file Tools.cpp.
References clang::driver::Driver::Diag().
Referenced by clang::driver::tools::Clang::ConstructJob().
static void CheckPreprocessingOptions | ( | const Driver & | D, |
const ArgList & | Args | ||
) | [static] |
CheckPreprocessingOptions - Perform some validation of preprocessing arguments that is shared with gcc.
Definition at line 64 of file Tools.cpp.
References clang::driver::Driver::CCCIsCPP(), clang::driver::Driver::Diag(), and clang::driver::Driver::IsCLMode().
static void CollectArgsForIntegratedAssembler | ( | Compilation & | C, |
const ArgList & | Args, | ||
ArgStringList & | CmdArgs, | ||
const Driver & | D | ||
) | [static] |
Definition at line 2063 of file Tools.cpp.
References clang::driver::Driver::Diag(), and UseRelaxAll().
Referenced by clang::driver::tools::Clang::ConstructJob(), and clang::driver::tools::ClangAs::ConstructJob().
static void collectSanitizerRuntimes | ( | const ToolChain & | TC, |
const ArgList & | Args, | ||
SmallVectorImpl< StringRef > & | SharedRuntimes, | ||
SmallVectorImpl< StringRef > & | StaticRuntimes, | ||
SmallVectorImpl< StringRef > & | HelperStaticRuntimes | ||
) | [static] |
Definition at line 2248 of file Tools.cpp.
References clang::driver::ToolChain::getSanitizerArgs(), clang::driver::ToolChain::getTriple(), clang::driver::SanitizerArgs::linkCXXRuntimes(), clang::driver::SanitizerArgs::needsAsanRt(), clang::driver::SanitizerArgs::needsDfsanRt(), clang::driver::SanitizerArgs::needsLsanRt(), clang::driver::SanitizerArgs::needsMsanRt(), clang::driver::SanitizerArgs::needsSharedAsanRt(), clang::driver::SanitizerArgs::needsTsanRt(), and clang::driver::SanitizerArgs::needsUbsanRt().
Referenced by addSanitizerRuntimes().
static bool ContainsCompileAction | ( | const Action * | A | ) | [static] |
Check whether the given input tree contains any compilation actions.
Definition at line 2030 of file Tools.cpp.
Referenced by UseRelaxAll().
static bool DecodeAArch64Features | ( | const Driver & | D, |
StringRef | text, | ||
std::vector< const char * > & | Features | ||
) | [static] |
Definition at line 1688 of file Tools.cpp.
References clang::driver::Driver::Diag().
Referenced by DecodeAArch64Mcpu(), and getAArch64ArchFeaturesFromMarch().
static bool DecodeAArch64Mcpu | ( | const Driver & | D, |
StringRef | Mcpu, | ||
StringRef & | CPU, | ||
std::vector< const char * > & | Features | ||
) | [static] |
Definition at line 1716 of file Tools.cpp.
References DecodeAArch64Features().
Referenced by getAArch64ArchFeaturesFromMcpu(), and getAArch64MicroArchFeaturesFromMcpu().
static void EscapeSpacesAndBackslashes | ( | const char * | Arg, |
SmallVectorImpl< char > & | Res | ||
) | [static] |
Definition at line 89 of file Tools.cpp.
Referenced by clang::driver::tools::Clang::ConstructJob(), and clang::driver::tools::ClangAs::ConstructJob().
static ExceptionSettings exceptionSettings | ( | const ArgList & | Args, |
const llvm::Triple & | Triple | ||
) | [static] |
Definition at line 1920 of file Tools.cpp.
Referenced by addExceptionArgs(), and clang::driver::tools::XCore::Link::ConstructJob().
static std::string FindVisualStudioExecutable | ( | const ToolChain & | TC, |
const char * | Exe, | ||
const char * | ClangProgramPath | ||
) | [static] |
Definition at line 7845 of file Tools.cpp.
Referenced by clang::driver::tools::visualstudio::Link::ConstructJob(), and clang::driver::tools::visualstudio::Compile::GetCommand().
static bool forwardToGCC | ( | const Option & | O | ) | [static] |
Definition at line 251 of file Tools.cpp.
References clang::driver::options::DriverOption, and clang::driver::options::LinkerInput.
Referenced by clang::driver::tools::gcc::Common::ConstructJob().
static bool getAArch64ArchFeaturesFromMarch | ( | const Driver & | D, |
StringRef | March, | ||
const ArgList & | Args, | ||
std::vector< const char * > & | Features | ||
) | [static] |
Definition at line 1737 of file Tools.cpp.
References DecodeAArch64Features().
Referenced by getAArch64TargetFeatures().
static bool getAArch64ArchFeaturesFromMcpu | ( | const Driver & | D, |
StringRef | Mcpu, | ||
const ArgList & | Args, | ||
std::vector< const char * > & | Features | ||
) | [static] |
Definition at line 1751 of file Tools.cpp.
References DecodeAArch64Mcpu().
Referenced by getAArch64TargetFeatures().
static bool getAArch64MicroArchFeaturesFromMcpu | ( | const Driver & | D, |
StringRef | Mcpu, | ||
const ArgList & | Args, | ||
std::vector< const char * > & | Features | ||
) | [static] |
Definition at line 1776 of file Tools.cpp.
References DecodeAArch64Mcpu(), and getAArch64MicroArchFeaturesFromMtune().
Referenced by getAArch64TargetFeatures().
static bool getAArch64MicroArchFeaturesFromMtune | ( | const Driver & | D, |
StringRef | Mtune, | ||
const ArgList & | Args, | ||
std::vector< const char * > & | Features | ||
) | [static] |
Definition at line 1762 of file Tools.cpp.
Referenced by getAArch64MicroArchFeaturesFromMcpu(), and getAArch64TargetFeatures().
static std::string getAArch64TargetCPU | ( | const ArgList & | Args | ) | [static] |
getAArch64TargetCPU - Get the (LLVM) name of the AArch64 cpu we are targeting.
Definition at line 876 of file Tools.cpp.
Referenced by getAArch64TargetFeatures(), and getCPUName().
static void getAArch64TargetFeatures | ( | const Driver & | D, |
const ArgList & | Args, | ||
std::vector< const char * > & | Features | ||
) | [static] |
Definition at line 1787 of file Tools.cpp.
References clang::driver::Driver::Diag(), getAArch64ArchFeaturesFromMarch(), getAArch64ArchFeaturesFromMcpu(), getAArch64MicroArchFeaturesFromMcpu(), getAArch64MicroArchFeaturesFromMtune(), and getAArch64TargetCPU().
Referenced by getTargetFeatures().
static StringRef getArchNameForCompilerRTLib | ( | const ToolChain & | TC | ) | [static] |
Definition at line 2131 of file Tools.cpp.
References clang::driver::ToolChain::getArch(), and clang::driver::ToolChain::getArchName().
Referenced by addClangRTLinux(), addClangRTWindows(), addProfileRT(), and getSanitizerRTLibName().
static void getARMFPUFeatures | ( | const Driver & | D, |
const Arg * | A, | ||
const ArgList & | Args, | ||
std::vector< const char * > & | Features | ||
) | [static] |
Definition at line 533 of file Tools.cpp.
References clang::driver::Driver::Diag().
Referenced by getARMTargetFeatures().
static void getARMHWDivFeatures | ( | const Driver & | D, |
const Arg * | A, | ||
const ArgList & | Args, | ||
std::vector< const char * > & | Features | ||
) | [static] |
Definition at line 509 of file Tools.cpp.
References clang::driver::Driver::Diag().
Referenced by getARMTargetFeatures().
static void getARMTargetFeatures | ( | const Driver & | D, |
const llvm::Triple & | Triple, | ||
const ArgList & | Args, | ||
std::vector< const char * > & | Features, | ||
bool | ForAS | ||
) | [static] |
Definition at line 699 of file Tools.cpp.
References clang::driver::tools::arm::getARMFloatABI(), getARMFPUFeatures(), and getARMHWDivFeatures().
Referenced by getTargetFeatures().
static SmallString<128> getCompilerRTLibDir | ( | const ToolChain & | TC | ) | [static] |
Definition at line 2139 of file Tools.cpp.
References clang::driver::ToolChain::getDriver(), clang::driver::ToolChain::getOS(), clang::driver::ToolChain::getTriple(), and clang::driver::Driver::ResourceDir.
Referenced by addClangRTLinux(), addClangRTWindows(), addProfileRT(), addSanitizerRTWindows(), and getSanitizerRTLibName().
static std::string getCPUName | ( | const ArgList & | Args, |
const llvm::Triple & | T | ||
) | [static] |
Definition at line 1455 of file Tools.cpp.
References getAArch64TargetCPU(), clang::driver::tools::arm::getARMTargetCPU(), clang::driver::tools::mips::getMipsCPUAndABI(), getPPCTargetCPU(), getR600TargetGPU(), getSystemZTargetCPU(), clang::driver::toolchains::Hexagon_TC::GetTargetCPU(), and getX86TargetCPU().
Referenced by AddGoldPlugin(), clang::driver::tools::Clang::ConstructJob(), and clang::driver::tools::ClangAs::ConstructJob().
static StringRef getGnuCompatibleMipsABIName | ( | StringRef | ABI | ) | [static] |
Definition at line 1025 of file Tools.cpp.
Referenced by clang::driver::tools::openbsd::Assemble::ConstructJob(), clang::driver::tools::freebsd::Assemble::ConstructJob(), clang::driver::tools::netbsd::Assemble::ConstructJob(), clang::driver::tools::gnutools::Assemble::ConstructJob(), and getMIPSTargetFeatures().
static std::string GetHexagonSmallDataThresholdValue | ( | const ArgList & | Args | ) | [static] |
Definition at line 1653 of file Tools.cpp.
References GetLastSmallDataThresholdArg(), and HasPICArg().
Referenced by clang::driver::tools::hexagon::Assemble::ConstructJob(), and clang::driver::tools::hexagon::Link::ConstructJob().
static Arg* GetLastSmallDataThresholdArg | ( | const ArgList & | Args | ) | [static] |
Definition at line 1647 of file Tools.cpp.
Referenced by GetHexagonSmallDataThresholdValue().
static const char* getLDMOption | ( | const llvm::Triple & | T, |
const ArgList & | Args | ||
) | [static] |
Definition at line 7327 of file Tools.cpp.
References clang::driver::tools::mips::hasMipsAbiArg().
Referenced by clang::driver::tools::gnutools::Link::ConstructJob().
static std::string getLinuxDynamicLinker | ( | const ArgList & | Args, |
const toolchains::Linux & | ToolChain | ||
) | [static] |
Definition at line 7236 of file Tools.cpp.
References clang::driver::ToolChain::getArch(), clang::driver::tools::mips::getMipsCPUAndABI(), clang::driver::ToolChain::getTriple(), clang::driver::tools::ppc::hasPPCAbiArg(), clang::driver::tools::mips::isNaN2008(), and clang::driver::tools::mips::isUCLibc().
Referenced by clang::driver::tools::gnutools::Link::ConstructJob().
static StringRef getMipsFloatABI | ( | const Driver & | D, |
const ArgList & | Args | ||
) | [static] |
Definition at line 1034 of file Tools.cpp.
References clang::driver::Driver::Diag().
Referenced by getMIPSTargetFeatures().
static void getMIPSTargetFeatures | ( | const Driver & | D, |
const llvm::Triple & | Triple, | ||
const ArgList & | Args, | ||
std::vector< const char * > & | Features | ||
) | [static] |
Definition at line 1075 of file Tools.cpp.
References AddTargetFeature(), clang::driver::Driver::Diag(), getGnuCompatibleMipsABIName(), clang::driver::tools::mips::getMipsCPUAndABI(), getMipsFloatABI(), and clang::driver::tools::mips::isFPXXDefault().
Referenced by getTargetFeatures().
static std::string getMSCompatibilityVersion | ( | const char * | VersionStr | ) | [static] |
Definition at line 2457 of file Tools.cpp.
Referenced by clang::driver::tools::Clang::ConstructJob().
static std::string getPPCTargetCPU | ( | const ArgList & | Args | ) | [static] |
getPPCTargetCPU - Get the (LLVM) name of the PowerPC cpu we are targeting.
Definition at line 1207 of file Tools.cpp.
Referenced by getCPUName().
static void getPPCTargetFeatures | ( | const ArgList & | Args, |
std::vector< const char * > & | Features | ||
) | [static] |
Definition at line 1270 of file Tools.cpp.
References AddTargetFeature().
Referenced by getTargetFeatures().
static std::string getR600TargetGPU | ( | const ArgList & | Args | ) | [static] |
Get the (LLVM) name of the R600 gpu we are targeting.
Definition at line 1331 of file Tools.cpp.
Referenced by getCPUName().
static SmallString<128> getSanitizerRTLibName | ( | const ToolChain & | TC, |
StringRef | Sanitizer, | ||
bool | Shared | ||
) | [static] |
Definition at line 2192 of file Tools.cpp.
References getArchNameForCompilerRTLib(), getCompilerRTLibDir(), and clang::driver::ToolChain::getTriple().
Referenced by addSanitizerDynamicList(), and addSanitizerRuntime().
static void getSparcTargetFeatures | ( | const ArgList & | Args, |
std::vector< const char * > & | Features | ||
) | [static] |
Definition at line 1347 of file Tools.cpp.
Referenced by getTargetFeatures().
static const char* getSystemZTargetCPU | ( | const ArgList & | Args | ) | [static] |
Definition at line 1391 of file Tools.cpp.
Referenced by clang::driver::tools::gnutools::Assemble::ConstructJob(), and getCPUName().
static void getTargetFeatures | ( | const Driver & | D, |
const llvm::Triple & | Triple, | ||
const ArgList & | Args, | ||
ArgStringList & | CmdArgs, | ||
bool | ForAS | ||
) | [static] |
Definition at line 1830 of file Tools.cpp.
References getAArch64TargetFeatures(), getARMTargetFeatures(), getMIPSTargetFeatures(), getPPCTargetFeatures(), getSparcTargetFeatures(), getX86TargetFeatures(), and clang::LangAS::Last.
Referenced by clang::driver::tools::Clang::ConstructJob(), and clang::driver::tools::ClangAs::ConstructJob().
static const char* getX86TargetCPU | ( | const ArgList & | Args, |
const llvm::Triple & | Triple | ||
) | [static] |
Definition at line 1397 of file Tools.cpp.
Referenced by getCPUName().
static void getX86TargetFeatures | ( | const Driver & | D, |
const llvm::Triple & | Triple, | ||
const ArgList & | Args, | ||
std::vector< const char * > & | Features | ||
) | [static] |
Definition at line 1537 of file Tools.cpp.
References clang::driver::Driver::Diag().
Referenced by getTargetFeatures().
Definition at line 1642 of file Tools.cpp.
Referenced by GetHexagonSmallDataThresholdValue().
static bool isNoCommonDefault | ( | const llvm::Triple & | Triple | ) | [static] |
Definition at line 498 of file Tools.cpp.
Referenced by clang::driver::tools::Clang::ConstructJob().
static bool isObjCAutoRefCount | ( | const ArgList & | Args | ) | [static] |
Determine whether Objective-C automated reference counting is enabled.
Definition at line 238 of file Tools.cpp.
Referenced by clang::driver::tools::Clang::ConstructJob(), and isObjCRuntimeLinked().
static bool isObjCRuntimeLinked | ( | const ArgList & | Args | ) | [static] |
Determine whether we are linking the ObjC runtime.
Definition at line 243 of file Tools.cpp.
References isObjCAutoRefCount().
Referenced by clang::driver::tools::darwin::Link::ConstructJob().
static bool isSignedCharDefault | ( | const llvm::Triple & | Triple | ) | [static] |
Definition at line 470 of file Tools.cpp.
Referenced by clang::driver::tools::Clang::ConstructJob().
static void linkSanitizerRuntimeDeps | ( | const ToolChain & | TC, |
ArgStringList & | CmdArgs | ||
) | [static] |
Definition at line 2234 of file Tools.cpp.
References clang::driver::ToolChain::getTriple().
Referenced by clang::driver::tools::freebsd::Link::ConstructJob(), and clang::driver::tools::gnutools::Link::ConstructJob().
static bool maybeConsumeDash | ( | const std::string & | EH, |
size_t & | I | ||
) | [static] |
Definition at line 4660 of file Tools.cpp.
Referenced by parseClangCLEHFlags().
static EHFlags parseClangCLEHFlags | ( | const Driver & | D, |
const ArgList & | Args | ||
) | [static] |
/EH controls whether to run destructor cleanups when exceptions are thrown. There are three modifiers:
Definition at line 4681 of file Tools.cpp.
References EHFlags::Asynch, clang::driver::Driver::Diag(), maybeConsumeDash(), EHFlags::NoExceptC, and EHFlags::Synch.
static void QuoteTarget | ( | StringRef | Target, |
SmallVectorImpl< char > & | Res | ||
) | [static] |
static bool ShouldDisableAutolink | ( | const ArgList & | Args, |
const ToolChain & | TC | ||
) | [static] |
Definition at line 2009 of file Tools.cpp.
References clang::driver::ToolChain::getTriple(), and clang::driver::ToolChain::useIntegratedAs().
Referenced by clang::driver::tools::Clang::ConstructJob().
static bool ShouldDisableDwarfDirectory | ( | const ArgList & | Args, |
const ToolChain & | TC | ||
) | [static] |
Definition at line 2021 of file Tools.cpp.
References clang::driver::ToolChain::useIntegratedAs().
Referenced by clang::driver::tools::Clang::ConstructJob().
static bool shouldEnableVectorizerAtOLevel | ( | const ArgList & | Args, |
bool | isSlpVec | ||
) | [static] |
Vectorize at all optimization levels greater than 1 except for -Oz. For -Oz the loop vectorizer is disable, while the slp vectorizer is enabled.
Definition at line 2412 of file Tools.cpp.
References S.
Referenced by clang::driver::tools::Clang::ConstructJob().
static bool shouldUseExceptionTablesForObjCExceptions | ( | const ObjCRuntime & | runtime, |
const llvm::Triple & | Triple | ||
) | [static] |
Definition at line 1893 of file Tools.cpp.
References clang::ObjCRuntime::isNonFragile().
Referenced by addExceptionArgs().
static bool shouldUseFramePointer | ( | const ArgList & | Args, |
const llvm::Triple & | Triple | ||
) | [static] |
Definition at line 2340 of file Tools.cpp.
References shouldUseFramePointerForTarget().
Referenced by clang::driver::tools::Clang::ConstructJob().
static bool shouldUseFramePointerForTarget | ( | const ArgList & | Args, |
const llvm::Triple & | Triple | ||
) | [static] |
Definition at line 2317 of file Tools.cpp.
Referenced by shouldUseFramePointer(), and shouldUseLeafFramePointer().
static bool shouldUseLeafFramePointer | ( | const ArgList & | Args, |
const llvm::Triple & | Triple | ||
) | [static] |
Definition at line 2349 of file Tools.cpp.
References shouldUseFramePointerForTarget().
Referenced by clang::driver::tools::Clang::ConstructJob().
static void SplitDebugInfo | ( | const ToolChain & | TC, |
Compilation & | C, | ||
const Tool & | T, | ||
const JobAction & | JA, | ||
const ArgList & | Args, | ||
const InputInfo & | Output, | ||
const char * | OutFile | ||
) | [static] |
Definition at line 2385 of file Tools.cpp.
References clang::driver::Compilation::addCommand(), clang::driver::InputInfo::getFilename(), and clang::driver::ToolChain::GetProgramPath().
Referenced by clang::driver::tools::Clang::ConstructJob(), clang::driver::tools::ClangAs::ConstructJob(), and clang::driver::tools::gnutools::Assemble::ConstructJob().
static const char* SplitDebugName | ( | const ArgList & | Args, |
const InputInfoList & | Inputs | ||
) | [static] |
Definition at line 2367 of file Tools.cpp.
Referenced by clang::driver::tools::Clang::ConstructJob(), clang::driver::tools::ClangAs::ConstructJob(), and clang::driver::tools::gnutools::Assemble::ConstructJob().
static bool UseRelaxAll | ( | Compilation & | C, |
const ArgList & | Args | ||
) | [static] |
Check if -relax-all should be passed to the internal assembler. This is done by default when compiling non-assembler source with -O0.
Definition at line 2043 of file Tools.cpp.
References ContainsCompileAction(), and clang::driver::Compilation::getActions().
Referenced by CollectArgsForIntegratedAssembler().