clang 8.0.0

Enumerations | Functions
Clang.cpp File Reference
`#include "Clang.h"`
`#include "Arch/AArch64.h"`
`#include "Arch/ARM.h"`
`#include "Arch/Mips.h"`
`#include "Arch/PPC.h"`
`#include "Arch/RISCV.h"`
`#include "Arch/Sparc.h"`
`#include "Arch/SystemZ.h"`
`#include "Arch/X86.h"`
`#include "AMDGPU.h"`
`#include "CommonArgs.h"`
`#include "Hexagon.h"`
`#include "MSP430.h"`
`#include "InputInfo.h"`
`#include "PS4CPU.h"`
`#include "clang/Basic/CharInfo.h"`
`#include "clang/Basic/LangOptions.h"`
`#include "clang/Basic/ObjCRuntime.h"`
`#include "clang/Basic/Version.h"`
`#include "clang/Driver/Distro.h"`
`#include "clang/Driver/DriverDiagnostic.h"`
`#include "clang/Driver/Options.h"`
`#include "clang/Driver/SanitizerArgs.h"`
`#include "clang/Driver/XRayArgs.h"`
`#include "llvm/ADT/StringExtras.h"`
`#include "llvm/Config/llvm-config.h"`
`#include "llvm/Option/ArgList.h"`
`#include "llvm/Support/CodeGen.h"`
`#include "llvm/Support/Compression.h"`
`#include "llvm/Support/FileSystem.h"`
`#include "llvm/Support/Path.h"`
`#include "llvm/Support/Process.h"`
`#include "llvm/Support/TargetParser.h"`
`#include "llvm/Support/YAMLParser.h"`
Include dependency graph for Clang.cpp:

Go to the source code of this file.

## Enumerations
enum | DwarfFissionKind { DwarfFissionKind::None, DwarfFissionKind::Split, DwarfFissionKind::Single }

## Functions
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 | forAllAssociatedToolChains (Compilation &C, const JobAction &JA, const ToolChain &RegularToolChain, llvm::function_ref< void(const ToolChain &)> Work)
| Apply Work on the current tool chain RegularToolChain and any other offloading tool chain that is associated with the current action JA. More...
static bool | getRefinementStep (StringRef In, const Driver &D, const Arg &A, size_t &Position)
| This is a helper function for validating the optional refinement step parameter in reciprocal argument strings. More...
static void | ParseMRecip (const Driver &D, const ArgList &Args, ArgStringList &OutStrings)
| The -mrecip flag requires processing of many optional parameters. More...
static void | ParseMPreferVectorWidth (const Driver &D, const ArgList &Args, ArgStringList &CmdArgs)
| The -mprefer-vector-width option accepts either a positive integer or the string "none". More...
static void | getWebAssemblyTargetFeatures (const ArgList &Args, std::vector< StringRef > &Features)
static void | getTargetFeatures (const ToolChain &TC, const llvm::Triple &Triple, const ArgList &Args, ArgStringList &CmdArgs, bool ForAS)
static bool | shouldUseExceptionTablesForObjCExceptions (const ObjCRuntime &runtime, const llvm::Triple &Triple)
static void | addExceptionArgs (const ArgList &Args, types::ID InputType, const ToolChain &TC, bool KernelOrKext, const ObjCRuntime &objcRuntime, ArgStringList &CmdArgs)
| Adds exception related arguments to the driver command arguments. More...
static bool | ShouldDisableAutolink (const ArgList &Args, const ToolChain &TC)
static bool | ShouldDisableDwarfDirectory (const ArgList &Args, const ToolChain &TC)
static codegenoptions::DebugInfoKind | DebugLevelToInfoKind (const Arg &A)
static bool | mustUseNonLeafFramePointerForTarget (const llvm::Triple &Triple)
static bool | useFramePointerForTargetByDefault (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. More...
static void | addDebugPrefixMapArg (const Driver &D, const ArgList &Args, ArgStringList &CmdArgs)
| Add a CC1 and CC1AS option to specify the debug file path prefix map. More...
static bool | shouldEnableVectorizerAtOLevel (const ArgList &Args, bool isSlpVec)
| Vectorize at all optimization levels greater than 1 except for -Oz. More...
static void | addDashXForInput (const ArgList &Args, const InputInfo &Input, ArgStringList &CmdArgs)
| Add -x lang to `CmdArgs` for `Input`. More...
static void | appendUserToPath (SmallVectorImpl< char > &Result)
static void | addPGOAndCoverageFlags (Compilation &C, const Driver &D, const InputInfo &Output, const ArgList &Args, ArgStringList &CmdArgs)
static bool | ContainsCompileAction (const Action *A)
| Check whether the given input tree contains any compilation actions. More...
static bool | UseRelaxAll (Compilation &C, const ArgList &Args)
| Check if -relax-all should be passed to the internal assembler. More...
static unsigned | DwarfVersionNum (StringRef ArgValue)
static void | RenderDebugEnablingArgs (const ArgList &Args, ArgStringList &CmdArgs, codegenoptions::DebugInfoKind DebugInfoKind, unsigned DwarfVersion, llvm::DebuggerKind DebuggerTuning)
static bool | checkDebugInfoOption (const Arg *A, const ArgList &Args, const Driver &D, const ToolChain &TC)
static void | RenderDebugInfoCompressionArgs (const ArgList &Args, ArgStringList &CmdArgs, const Driver &D, const ToolChain &TC)
static const char * | RelocationModelName (llvm::Reloc::Model Model)
static bool | isSignedCharDefault (const llvm::Triple &Triple)
static bool | isNoCommonDefault (const llvm::Triple &Triple)
static std::tuple< StringRef, StringRef, bool > | ParseAArch64BranchProtection (const Driver &D, const ArgList &Args, const Arg *A)
static void | CollectArgsForIntegratedAssembler (Compilation &C, const ArgList &Args, ArgStringList &CmdArgs, const Driver &D)
static void | RenderFloatingPointOptions (const ToolChain &TC, const Driver &D, bool OFastEnabled, const ArgList &Args, ArgStringList &CmdArgs)
static void | RenderAnalyzerOptions (const ArgList &Args, ArgStringList &CmdArgs, const llvm::Triple &Triple, const InputInfo &Input)
static void | RenderSSPOptions (const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs, bool KernelOrKext)
static void | RenderTrivialAutoVarInitOptions (const Driver &D, const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs)
static void | RenderOpenCLOptions (const ArgList &Args, ArgStringList &CmdArgs)
static void | RenderARCMigrateToolOptions (const Driver &D, const ArgList &Args, ArgStringList &CmdArgs)
static void | RenderBuiltinOptions (const ToolChain &TC, const llvm::Triple &T, const ArgList &Args, ArgStringList &CmdArgs)
static void | RenderModulesOptions (Compilation &C, const Driver &D, const ArgList &Args, const InputInfo &Input, const InputInfo &Output, ArgStringList &CmdArgs, bool &HaveModules)
static void | RenderCharacterOptions (const ArgList &Args, const llvm::Triple &T, ArgStringList &CmdArgs)
static void | RenderObjCOptions (const ToolChain &TC, const Driver &D, const llvm::Triple &T, const ArgList &Args, ObjCRuntime &Runtime, bool InferCovariantReturns, const InputInfo &Input, ArgStringList &CmdArgs)
static void | RenderDiagnosticsOptions (const Driver &D, const ArgList &Args, ArgStringList &CmdArgs)
static DwarfFissionKind | getDebugFissionKind (const Driver &D, const ArgList &Args, Arg *&Arg)
static void | RenderDebugOptions (const ToolChain &TC, const Driver &D, const llvm::Triple &T, const ArgList &Args, bool EmitCodeView, bool IsWindowsMSVC, ArgStringList &CmdArgs, codegenoptions::DebugInfoKind &DebugInfoKind, DwarfFissionKind &DwarfFission)
static bool | maybeConsumeDash (const std::string &EH, size_t &I)
static EHFlags | parseClangCLEHFlags (const Driver &D, const ArgList &Args)
| /EH controls whether to run destructor cleanups when exceptions are thrown. More...

## Enumeration Type Documentation

## ◆ DwarfFissionKind

enum DwarfFissionKind
| strong

Enumerator
None |
Split |
Single |

Definition at line 3074 of file Clang.cpp.

## Function Documentation

## ◆ addDashXForInput()

static void addDashXForInput | ( | const ArgList & | Args,
|  | const InputInfo & | Input,
|  | ArgStringList & | CmdArgs
| ) |  |
| static

Add -x lang to `CmdArgs` for `Input`.

Definition at line 659 of file Clang.cpp.

References clang::driver::InputInfo::getType(), and clang::driver::types::getTypeName().

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ addDebugCompDirArg()

static void addDebugCompDirArg | ( | const ArgList & | Args,
|  | ArgStringList & | CmdArgs
| ) |  |
| static

Add a CC1 option to specify the debug compilation directory.

Definition at line 606 of file Clang.cpp.

Referenced by clang::driver::tools::Clang::ConstructJob(), and clang::driver::tools::ClangAs::ConstructJob().

## ◆ addDebugPrefixMapArg()

static void addDebugPrefixMapArg | ( | const Driver & | D,
|  | const ArgList & | Args,
|  | ArgStringList & | CmdArgs
| ) |  |
| static

Add a CC1 and CC1AS option to specify the debug file path prefix map.

Definition at line 615 of file Clang.cpp.

References clang::driver::Driver::Diag().

Referenced by clang::driver::tools::Clang::ConstructJob(), and clang::driver::tools::ClangAs::ConstructJob().

## ◆ addExceptionArgs()

static void addExceptionArgs | ( | const ArgList & | Args,
|  | types::ID | InputType,
|  | const ToolChain & | TC,
|  | bool | KernelOrKext,
|  | const ObjCRuntime & | objcRuntime,
|  | ArgStringList & | CmdArgs
| ) |  |
| static

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 415 of file Clang.cpp.

References clang::driver::ToolChain::getTriple(), clang::driver::types::isCXX(), clang::driver::types::isObjC(), and shouldUseExceptionTablesForObjCExceptions().

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ addPGOAndCoverageFlags()

static void addPGOAndCoverageFlags | ( | Compilation & | C,
|  | const Driver & | D,
|  | const InputInfo & | Output,
|  | const ArgList & | Args,
|  | ArgStringList & | CmdArgs
| ) |  |
| static

Definition at line 721 of file Clang.cpp.

References clang::driver::Driver::Diag(), clang::driver::Compilation::getArgs(), clang::driver::InputInfo::getBaseInput(), clang::driver::tools::getLastProfileUseArg(), clang::driver::InputInfo::isFilename(), and v.

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ appendUserToPath()

static void appendUserToPath | ( | SmallVectorImpl< char > & | Result | ) |
| static

Definition at line 689 of file Clang.cpp.

References clang::isAlphanumeric(), and P.

Referenced by clang::driver::Driver::getDefaultModuleCachePath().

## ◆ CheckCodeGenerationOptions()

static void CheckCodeGenerationOptions | ( | const Driver & | D,
|  | const ArgList & | Args
| ) |  |
| static

Definition at line 66 of file Clang.cpp.

References clang::driver::Driver::Diag().

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ checkDebugInfoOption()

static bool checkDebugInfoOption | ( | const Arg * | A,
|  | const ArgList & | Args,
|  | const Driver & | D,
|  | const ToolChain & | TC
| ) |  |
| static

Definition at line 955 of file Clang.cpp.

References clang::driver::Driver::Diag(), clang::driver::ToolChain::getTripleString(), and clang::driver::ToolChain::supportsDebugInfoOption().

Referenced by RenderDebugInfoCompressionArgs(), and RenderDebugOptions().

## ◆ CheckPreprocessingOptions()

static void CheckPreprocessingOptions | ( | const Driver & | D,
|  | const ArgList & | Args
| ) |  |
| static

Definition at line 54 of file Clang.cpp.

References clang::driver::Driver::CCCIsCPP(), clang::driver::Driver::Diag(), and clang::driver::Driver::IsCLMode().

Referenced by RelocationModelName().

## ◆ CollectArgsForIntegratedAssembler()

static void CollectArgsForIntegratedAssembler | ( | Compilation & | C,
|  | const ArgList & | Args,
|  | ArgStringList & | CmdArgs,
|  | const Driver & | D
| ) |  |
| static

Definition at line 1989 of file Clang.cpp.

References clang::driver::Driver::Diag(), DwarfVersionNum(), clang::driver::ToolChain::getArch(), clang::driver::Compilation::getDefaultToolChain(), clang::driver::ToolChain::getTriple(), clang::codegenoptions::LimitedDebugInfo, RenderDebugEnablingArgs(), UseRelaxAll(), and clang::driver::ToolChain::useRelaxRelocations().

Referenced by clang::driver::tools::Clang::ConstructJob(), and clang::driver::tools::ClangAs::ConstructJob().

## ◆ ContainsCompileAction()

static bool ContainsCompileAction | ( | const Action * | A | ) |
| static

Check whether the given input tree contains any compilation actions.

Definition at line 872 of file Clang.cpp.

References clang::driver::Action::inputs().

Referenced by UseRelaxAll().

## ◆ DebugLevelToInfoKind()

static codegenoptions::DebugInfoKind DebugLevelToInfoKind | ( | const Arg & | A | ) |
| static

Definition at line 491 of file Clang.cpp.

References clang::codegenoptions::DebugDirectivesOnly, clang::codegenoptions::DebugLineTablesOnly, clang::codegenoptions::LimitedDebugInfo, and clang::codegenoptions::NoDebugInfo.

Referenced by RenderDebugOptions().

## ◆ DwarfVersionNum()

static unsigned DwarfVersionNum | ( | StringRef | ArgValue | ) |
| static

Definition at line 908 of file Clang.cpp.

Referenced by CollectArgsForIntegratedAssembler(), clang::driver::tools::ClangAs::ConstructJob(), and RenderDebugOptions().

## ◆ EscapeSpacesAndBackslashes()

static void EscapeSpacesAndBackslashes | ( | const char * | Arg,
|  | SmallVectorImpl< char > & | Res
| ) |  |
| static

Definition at line 78 of file Clang.cpp.

Referenced by clang::driver::tools::Clang::ConstructJob(), and clang::driver::tools::ClangAs::ConstructJob().

## ◆ forAllAssociatedToolChains()

static void forAllAssociatedToolChains | ( | Compilation & | C,
|  | const JobAction & | JA,
|  | const ToolChain & | RegularToolChain,
|  | llvm::function_ref< void(const ToolChain &)> | Work
| ) |  |
| static

Apply Work on the current tool chain RegularToolChain and any other offloading tool chain that is associated with the current action JA.

Definition at line 124 of file Clang.cpp.

References clang::driver::Compilation::getOffloadToolChains(), clang::driver::Compilation::getSingleOffloadToolChain(), clang::driver::Action::isDeviceOffloading(), clang::driver::Action::isHostOffloading(), clang::driver::Action::OFK_Cuda, clang::driver::Action::OFK_HIP, clang::driver::Action::OFK_Host, and clang::driver::Action::OFK_OpenMP.

Referenced by RelocationModelName().

## ◆ getDebugFissionKind()

static DwarfFissionKind getDebugFissionKind | ( | const Driver & | D,
|  | const ArgList & | Args,
|  | Arg *& | Arg
| ) |  |
| static

Definition at line 3076 of file Clang.cpp.

References clang::driver::Driver::Diag(), None, Single, and Split.

Referenced by clang::driver::tools::ClangAs::ConstructJob(), and RenderDebugOptions().

## ◆ getRefinementStep()

static bool getRefinementStep | ( | StringRef | In,
|  | const Driver & | D,
|  | const Arg & | A,
|  | size_t & | Position
| ) |  |
| static

This is a helper function for validating the optional refinement step parameter in reciprocal argument strings.

Return false if there is an error parsing the refinement step. Otherwise, return true and set the Position of the refinement step in the input string.

Definition at line 157 of file Clang.cpp.

Referenced by ParseMRecip().

## ◆ getTargetFeatures()

static void getTargetFeatures | ( | const ToolChain & | TC,
|  | const llvm::Triple & | Triple,
|  | const ArgList & | Args,
|  | ArgStringList & | CmdArgs,
|  | bool | ForAS
| ) |  |
| static

Definition at line 310 of file Clang.cpp.

References clang::driver::tools::aarch64::getAArch64TargetFeatures(), clang::driver::tools::amdgpu::getAMDGPUTargetFeatures(), clang::driver::tools::arm::getARMTargetFeatures(), clang::driver::ToolChain::getDriver(), clang::driver::tools::hexagon::getHexagonTargetFeatures(), clang::driver::tools::mips::getMIPSTargetFeatures(), clang::driver::tools::msp430::getMSP430TargetFeatures(), clang::driver::tools::ppc::getPPCTargetFeatures(), clang::driver::tools::riscv::getRISCVTargetFeatures(), clang::driver::tools::sparc::getSparcTargetFeatures(), clang::driver::tools::systemz::getSystemZTargetFeatures(), getWebAssemblyTargetFeatures(), and clang::driver::tools::x86::getX86TargetFeatures().

Referenced by clang::driver::tools::ClangAs::ConstructJob(), and isNoCommonDefault().

## ◆ getWebAssemblyTargetFeatures()

static void getWebAssemblyTargetFeatures | ( | const ArgList & | Args,
|  | std::vector< StringRef > & | Features
| ) |  |
| static

Definition at line 305 of file Clang.cpp.

References clang::driver::tools::handleTargetFeaturesGroup().

Referenced by getTargetFeatures().

## ◆ isNoCommonDefault()

static bool isNoCommonDefault | ( | const llvm::Triple & | Triple | ) |
| static

Definition at line 1298 of file Clang.cpp.

References clang::driver::ToolChain::getArch(), clang::driver::tools::arm::getARMFloatABI(), clang::driver::tools::getCPUName(), getTargetFeatures(), clang::driver::tools::arm::Hard, clang::driver::tools::arm::Soft, and clang::driver::tools::arm::SoftFP.

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ isSignedCharDefault()

static bool isSignedCharDefault | ( | const llvm::Triple & | Triple | ) |
| static

Definition at line 1267 of file Clang.cpp.

Referenced by RenderCharacterOptions().

## ◆ maybeConsumeDash()

static bool maybeConsumeDash | ( | const std::string & | EH,
|  | size_t & | I
| ) |  |
| static

Definition at line 5510 of file Clang.cpp.

Referenced by parseClangCLEHFlags().

## ◆ mustUseNonLeafFramePointerForTarget()

static bool mustUseNonLeafFramePointerForTarget | ( | const llvm::Triple & | Triple | ) |
| static

Definition at line 505 of file Clang.cpp.

Referenced by shouldUseFramePointer().

## ◆ ParseAArch64BranchProtection()

static std::tuple<StringRef, StringRef, bool> ParseAArch64BranchProtection | ( | const Driver & | D,
|  | const ArgList & | Args,
|  | const Arg * | A
| ) |  |
| static

Definition at line 1450 of file Clang.cpp.

References clang::driver::Driver::ClangExecutable, clang::driver::Driver::Diag(), Filename, clang::driver::Compilation::getArgs(), clang::driver::InputInfo::getFilename(), clang::driver::tools::mips::getMipsCPUAndABI(), clang::driver::tools::mips::getMipsFloatABI(), clang::driver::tools::ppc::getPPCFloatABI(), clang::driver::toolchains::HexagonToolChain::getSmallDataThreshold(), clang::driver::tools::sparc::getSparcFloatABI(), clang::driver::InputInfo::getType(), clang::driver::types::getTypeName(), clang::driver::tools::sparc::Hard, clang::driver::tools::ppc::Hard, clang::driver::tools::mips::Hard, clang::driver::tools::mips::hasCompactBranches(), clang::driver::tools::ParsePICArgs(), clang::driver::tools::sparc::Soft, clang::driver::tools::ppc::Soft, clang::driver::tools::mips::Soft, clang::driver::Driver::SysRoot, clang::Target, and v.

## ◆ 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:

- s: Cleanup after "synchronous" exceptions, aka C++ exceptions.
- a: Cleanup after "asynchronous" exceptions, aka structured exceptions. The 'a' modifier is unimplemented and fundamentally hard in LLVM IR.
- c: Assume that extern "C" functions are implicitly nounwind. The default is /EHs-c-, meaning cleanups are disabled.

Definition at line 5531 of file Clang.cpp.

References clang::codegenoptions::DebugLineTablesOnly, clang::driver::Driver::Diag(), clang::driver::ToolChain::getArch(), clang::driver::ToolChain::getDriver(), clang::driver::Tool::getToolChain(), clang::driver::types::isCXX(), clang::codegenoptions::LimitedDebugInfo, maybeConsumeDash(), and clang::LangOptions::SSPStrong.

## ◆ ParseMPreferVectorWidth()

static void ParseMPreferVectorWidth | ( | const Driver & | D,
|  | const ArgList & | Args,
|  | ArgStringList & | CmdArgs
| ) |  |
| static

The -mprefer-vector-width option accepts either a positive integer or the string "none".

Definition at line 286 of file Clang.cpp.

References clang::driver::Driver::Diag().

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ ParseMRecip()

static void ParseMRecip | ( | const Driver & | D,
|  | const ArgList & | Args,
|  | ArgStringList & | OutStrings
| ) |  |
| static

The -mrecip flag requires processing of many optional parameters.

Definition at line 185 of file Clang.cpp.

References clang::driver::Driver::Diag(), and getRefinementStep().

Referenced by RenderFloatingPointOptions().

## ◆ QuoteTarget()

static void QuoteTarget | ( | StringRef | Target,
|  | SmallVectorImpl< char > & | Res
| ) |  |
| static

Definition at line 95 of file Clang.cpp.

Referenced by RelocationModelName().

## ◆ RelocationModelName()

static const char* RelocationModelName | ( | llvm::Reloc::Model | Model | ) |
| static

Definition at line 998 of file Clang.cpp.

References clang::driver::ToolChain::AddClangCXXStdlibIncludeArgs(), clang::driver::ToolChain::AddClangSystemIncludeArgs(), clang::driver::tools::addDirectoryList(), clang::driver::Compilation::addFailureResultFile(), clang::driver::Action::AssembleJobClass, CheckPreprocessingOptions(), clang::driver::Driver::Diag(), forAllAssociatedToolChains(), clang::driver::Compilation::getArgs(), clang::driver::Driver::GetClPchPath(), clang::driver::InputInfo::getFilename(), clang::driver::Action::getKind(), clang::driver::Compilation::getSysRoot(), clang::driver::InputInfo::getType(), clang::driver::types::isCXX(), clang::driver::Action::isOffloading(), clang::driver::Action::OFK_Cuda, P, clang::driver::Action::PrecompileJobClass, clang::frontend::Quoted, and QuoteTarget().

Referenced by clang::driver::tools::Clang::ConstructJob(), and clang::driver::tools::ClangAs::ConstructJob().

## ◆ RenderAnalyzerOptions()

static void RenderAnalyzerOptions | ( | const ArgList & | Args,
|  | ArgStringList & | CmdArgs,
|  | const llvm::Triple & | Triple,
|  | const InputInfo & | Input
| ) |  |
| static

Definition at line 2366 of file Clang.cpp.

References clang::driver::InputInfo::getType(), and clang::driver::types::isCXX().

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ RenderARCMigrateToolOptions()

static void RenderARCMigrateToolOptions | ( | const Driver & | D,
|  | const ArgList & | Args,
|  | ArgStringList & | CmdArgs
| ) |  |
| static

Definition at line 2554 of file Clang.cpp.

References clang::driver::Driver::Diag().

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ RenderBuiltinOptions()

static void RenderBuiltinOptions | ( | const ToolChain & | TC,
|  | const llvm::Triple & | T,
|  | const ArgList & | Args,
|  | ArgStringList & | CmdArgs
| ) |  |
| static

Definition at line 2626 of file Clang.cpp.

References clang::driver::ToolChain::getArch().

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ RenderCharacterOptions()

static void RenderCharacterOptions | ( | const ArgList & | Args,
|  | const llvm::Triple & | T,
|  | ArgStringList & | CmdArgs
| ) |  |
| static

Definition at line 2832 of file Clang.cpp.

References isSignedCharDefault().

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ RenderDebugEnablingArgs()

static void RenderDebugEnablingArgs | ( | const ArgList & | Args,
|  | ArgStringList & | CmdArgs,
|  | codegenoptions::DebugInfoKind | DebugInfoKind,
|  | unsigned | DwarfVersion,
|  | llvm::DebuggerKind | DebuggerTuning
| ) |  |
| static

Definition at line 917 of file Clang.cpp.

References clang::codegenoptions::DebugDirectivesOnly, clang::codegenoptions::DebugLineTablesOnly, clang::codegenoptions::FullDebugInfo, and clang::codegenoptions::LimitedDebugInfo.

Referenced by CollectArgsForIntegratedAssembler(), clang::driver::tools::ClangAs::ConstructJob(), and RenderDebugOptions().

## ◆ RenderDebugInfoCompressionArgs()

static void RenderDebugInfoCompressionArgs | ( | const ArgList & | Args,
|  | ArgStringList & | CmdArgs,
|  | const Driver & | D,
|  | const ToolChain & | TC
| ) |  |
| static

Definition at line 965 of file Clang.cpp.

References checkDebugInfoOption(), and clang::driver::Driver::Diag().

Referenced by clang::driver::tools::ClangAs::ConstructJob(), and RenderDebugOptions().

## ◆ RenderDebugOptions()

static void RenderDebugOptions | ( | const ToolChain & | TC,
|  | const Driver & | D,
|  | const llvm::Triple & | T,
|  | const ArgList & | Args,
|  | bool | EmitCodeView,
|  | bool | IsWindowsMSVC,
|  | ArgStringList & | CmdArgs,
|  | codegenoptions::DebugInfoKind & | DebugInfoKind,
|  | DwarfFissionKind & | DwarfFission
| ) |  |
| static

Definition at line 3097 of file Clang.cpp.

References clang::driver::ToolChain::adjustDebugInfoKind(), checkDebugInfoOption(), clang::codegenoptions::DebugDirectivesOnly, DebugLevelToInfoKind(), clang::codegenoptions::DebugLineTablesOnly, clang::codegenoptions::DIF_CodeView, clang::codegenoptions::DIF_DWARF, DwarfVersionNum(), clang::codegenoptions::FullDebugInfo, getDebugFissionKind(), clang::driver::ToolChain::getDefaultDebugFormat(), clang::driver::ToolChain::getDefaultDebuggerTuning(), clang::driver::ToolChain::GetDefaultDwarfVersion(), clang::driver::ToolChain::GetDefaultStandaloneDebug(), clang::codegenoptions::LimitedDebugInfo, clang::codegenoptions::NoDebugInfo, None, RenderDebugEnablingArgs(), RenderDebugInfoCompressionArgs(), and Single.

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ RenderDiagnosticsOptions()

static void RenderDiagnosticsOptions | ( | const Driver & | D,
|  | const ArgList & | Args,
|  | ArgStringList & | CmdArgs
| ) |  |
| static

Definition at line 2959 of file Clang.cpp.

References clang::driver::Driver::Diag(), clang::DiagnosticsEngine::getDiagnosticOptions(), clang::driver::Driver::getDiags(), and llvm::str().

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ RenderFloatingPointOptions()

static void RenderFloatingPointOptions | ( | const ToolChain & | TC,
|  | const Driver & | D,
|  | bool | OFastEnabled,
|  | const ArgList & | Args,
|  | ArgStringList & | CmdArgs
| ) |  |
| static

Definition at line 2189 of file Clang.cpp.

References clang::driver::Driver::Diag(), clang::driver::ToolChain::IsMathErrnoDefault(), and ParseMRecip().

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ RenderModulesOptions()

static void RenderModulesOptions | ( | Compilation & | C,
|  | const Driver & | D,
|  | const ArgList & | Args,
|  | const InputInfo & | Input,
|  | const InputInfo & | Output,
|  | ArgStringList & | CmdArgs,
|  | bool & | HaveModules
| ) |  |
| static

Definition at line 2670 of file Clang.cpp.

References clang::driver::Compilation::addTempFile(), clang::driver::Driver::Diag(), clang::driver::Driver::getDefaultModuleCachePath(), clang::driver::InputInfo::getFilename(), clang::driver::InputInfo::getType(), clang::driver::types::isCXX(), clang::driver::Compilation::isForDiagnostics(), and clang::driver::Driver::ResourceDir.

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ RenderObjCOptions()

static void RenderObjCOptions | ( | const ToolChain & | TC,
|  | const Driver & | D,
|  | const llvm::Triple & | T,
|  | const ArgList & | Args,
|  | ObjCRuntime & | Runtime,
|  | bool | InferCovariantReturns,
|  | const InputInfo & | Input,
|  | ArgStringList & | CmdArgs
| ) |  |
| static

Definition at line 2869 of file Clang.cpp.

References clang::ObjCRuntime::allowsWeak(), clang::driver::ToolChain::CheckObjCARC(), clang::driver::ToolChain::CST_Libcxx, clang::driver::Driver::Diag(), clang::ObjCRuntime::FragileMacOSX, clang::driver::ToolChain::getArch(), clang::driver::ToolChain::GetCXXStdlibType(), clang::ObjCRuntime::getKind(), clang::driver::InputInfo::getType(), clang::driver::types::isCXX(), clang::ObjCRuntime::isLegacyDispatchDefaultForArch(), clang::ObjCRuntime::isNeXTFamily(), clang::ObjCRuntime::isNonFragile(), clang::driver::types::isObjC(), clang::driver::tools::isObjCAutoRefCount(), and clang::driver::ToolChain::UseObjCMixedDispatch().

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ RenderOpenCLOptions()

static void RenderOpenCLOptions | ( | const ArgList & | Args,
|  | ArgStringList & | CmdArgs
| ) |  |
| static

Definition at line 2528 of file Clang.cpp.

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ RenderSSPOptions()

static void RenderSSPOptions | ( | const ToolChain & | TC,
|  | const ArgList & | Args,
|  | ArgStringList & | CmdArgs,
|  | bool | KernelOrKext
| ) |  |
| static

Definition at line 2436 of file Clang.cpp.

References clang::driver::ToolChain::GetDefaultStackProtectorLevel(), clang::driver::ToolChain::getEffectiveTriple(), clang::LangOptions::SSPOn, clang::LangOptions::SSPReq, and clang::LangOptions::SSPStrong.

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ RenderTrivialAutoVarInitOptions()

static void RenderTrivialAutoVarInitOptions | ( | const Driver & | D,
|  | const ToolChain & | TC,
|  | const ArgList & | Args,
|  | ArgStringList & | CmdArgs
| ) |  |
| static

Definition at line 2484 of file Clang.cpp.

References clang::driver::Driver::Diag(), clang::driver::ToolChain::GetDefaultTrivialAutoVarInit(), clang::LangOptions::Pattern, clang::LangOptions::Uninitialized, and clang::LangOptions::Zero.

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ ShouldDisableAutolink()

static bool ShouldDisableAutolink | ( | const ArgList & | Args,
|  | const ToolChain & | TC
| ) |  |
| static

Definition at line 470 of file Clang.cpp.

References clang::Default, clang::driver::ToolChain::getTriple(), and clang::driver::ToolChain::useIntegratedAs().

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ ShouldDisableDwarfDirectory()

static bool ShouldDisableDwarfDirectory | ( | const ArgList & | Args,
|  | const ToolChain & | TC
| ) |  |
| static

Definition at line 481 of file Clang.cpp.

References clang::driver::ToolChain::useIntegratedAs().

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ shouldEnableVectorizerAtOLevel()

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 628 of file Clang.cpp.

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ shouldUseExceptionTablesForObjCExceptions()

static bool shouldUseExceptionTablesForObjCExceptions | ( | const ObjCRuntime & | runtime,
|  | const llvm::Triple & | Triple
| ) |  |
| static

Definition at line 395 of file Clang.cpp.

References clang::ObjCRuntime::isNonFragile().

Referenced by addExceptionArgs().

## ◆ shouldUseFramePointer()

static bool shouldUseFramePointer | ( | const ArgList & | Args,
|  | const llvm::Triple & | Triple
| ) |  |
| static

Definition at line 577 of file Clang.cpp.

References mustUseNonLeafFramePointerForTarget(), and useFramePointerForTargetByDefault().

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ shouldUseLeafFramePointer()

static bool shouldUseLeafFramePointer | ( | const ArgList & | Args,
|  | const llvm::Triple & | Triple
| ) |  |
| static

Definition at line 590 of file Clang.cpp.

References useFramePointerForTargetByDefault().

Referenced by clang::driver::tools::Clang::ConstructJob().

## ◆ useFramePointerForTargetByDefault()

static bool useFramePointerForTargetByDefault | ( | const ArgList & | Args,
|  | const llvm::Triple & | Triple
| ) |  |
| static

Definition at line 517 of file Clang.cpp.

References clang::driver::tools::areOptimizationsEnabled().

Referenced by shouldUseFramePointer(), and shouldUseLeafFramePointer().

## ◆ UseRelaxAll()

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 885 of file Clang.cpp.

References ContainsCompileAction(), and clang::driver::Compilation::getActions().

Referenced by CollectArgsForIntegratedAssembler().