clang  16.0.0git
Functions
Clang.cpp File Reference
#include "Clang.h"
#include "AMDGPU.h"
#include "Arch/AArch64.h"
#include "Arch/ARM.h"
#include "Arch/CSKY.h"
#include "Arch/LoongArch.h"
#include "Arch/M68k.h"
#include "Arch/Mips.h"
#include "Arch/PPC.h"
#include "Arch/RISCV.h"
#include "Arch/Sparc.h"
#include "Arch/SystemZ.h"
#include "Arch/VE.h"
#include "Arch/X86.h"
#include "CommonArgs.h"
#include "Hexagon.h"
#include "MSP430.h"
#include "PS4CPU.h"
#include "clang/Basic/CLWarnings.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/MakeSupport.h"
#include "clang/Basic/ObjCRuntime.h"
#include "clang/Basic/Version.h"
#include "clang/Config/config.h"
#include "clang/Driver/Action.h"
#include "clang/Driver/Distro.h"
#include "clang/Driver/DriverDiagnostic.h"
#include "clang/Driver/InputInfo.h"
#include "clang/Driver/Options.h"
#include "clang/Driver/SanitizerArgs.h"
#include "clang/Driver/Types.h"
#include "clang/Driver/XRayArgs.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Support/ARMTargetParserCommon.h"
#include "llvm/Support/CodeGen.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Compression.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/YAMLParser.h"
#include <cctype>
Include dependency graph for Clang.cpp:

Go to the source code of this file.

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 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 Driver &D, const llvm::Triple &Triple, const ArgList &Args, ArgStringList &CmdArgs, bool ForAS, bool IsAux=false)
 
static bool shouldUseExceptionTablesForObjCExceptions (const ObjCRuntime &runtime, const llvm::Triple &Triple)
 
static bool 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 ShouldEnableAutolink (const ArgList &Args, const ToolChain &TC, const JobAction &JA)
 
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 CodeGenOptions::FramePointerKind getFramePointerKind (const ArgList &Args, const llvm::Triple &Triple)
 
static const char * addDebugCompDirArg (const ArgList &Args, ArgStringList &CmdArgs, const llvm::vfs::FileSystem &VFS)
 Add a CC1 option to specify the debug compilation directory. More...
 
static void addDebugObjectName (const ArgList &Args, ArgStringList &CmdArgs, const char *DebugCompilationDir, const char *OutputFileName)
 
static void addDebugPrefixMapArg (const Driver &D, const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs)
 Add a CC1 and CC1AS option to specify the debug file path prefix map. More...
 
static void addMacroPrefixMapArg (const Driver &D, const ArgList &Args, ArgStringList &CmdArgs)
 Add a CC1 and CC1AS option to specify the macro file path prefix map. More...
 
static void addCoveragePrefixMapArg (const Driver &D, const ArgList &Args, ArgStringList &CmdArgs)
 Add a CC1 and CC1AS option to specify the coverage 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 addPGOAndCoverageFlags (const ToolChain &TC, Compilation &C, const Driver &D, const InputInfo &Output, const ArgList &Args, SanitizerArgs &SanArgs, 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 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 void handleAMDGPUCodeObjectVersionOptions (const Driver &D, const ArgList &Args, ArgStringList &CmdArgs, bool IsCC1As=false)
 
static bool isSignedCharDefault (const llvm::Triple &Triple)
 
static bool hasMultipleInvocations (const llvm::Triple &Triple, const ArgList &Args)
 
static bool checkRemarksOptions (const Driver &D, const ArgList &Args, const llvm::Triple &Triple)
 
static void renderRemarksOptions (const ArgList &Args, ArgStringList &CmdArgs, const llvm::Triple &Triple, const InputInfo &Input, const InputInfo &Output, const JobAction &JA)
 
void AddAAPCSVolatileBitfieldArgs (const ArgList &Args, ArgStringList &CmdArgs)
 
static void CollectARMPACBTIOptions (const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs, bool isAArch64)
 
static void SetRISCVSmallDataLimit (const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs)
 
static bool CheckARMImplicitITArg (StringRef Value)
 
static void AddARMImplicitITArgs (const ArgList &Args, ArgStringList &CmdArgs, StringRef Value)
 
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, const JobAction &JA)
 
static void RenderAnalyzerOptions (const ArgList &Args, ArgStringList &CmdArgs, const llvm::Triple &Triple, const InputInfo &Input)
 
static bool isValidSymbolName (StringRef S)
 
static void RenderSSPOptions (const Driver &D, const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs, bool KernelOrKext)
 
static void RenderSCPOptions (const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs)
 
static void RenderTrivialAutoVarInitOptions (const Driver &D, const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs)
 
static void RenderOpenCLOptions (const ArgList &Args, ArgStringList &CmdArgs, types::ID InputType)
 
static void RenderHLSLOptions (const ArgList &Args, ArgStringList &CmdArgs, types::ID InputType)
 
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 bool RenderModulesOptions (Compilation &C, const Driver &D, const ArgList &Args, const InputInfo &Input, const InputInfo &Output, const Arg *Std, ArgStringList &CmdArgs)
 
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 void renderDwarfFormat (const Driver &D, const llvm::Triple &T, const ArgList &Args, ArgStringList &CmdArgs, unsigned DwarfVersion)
 
static void renderDebugOptions (const ToolChain &TC, const Driver &D, const llvm::Triple &T, const ArgList &Args, bool EmitCodeView, bool IRInput, ArgStringList &CmdArgs, codegenoptions::DebugInfoKind &DebugInfoKind, DwarfFissionKind &DwarfFission)
 
static void ProcessVSRuntimeLibrary (const ArgList &Args, ArgStringList &CmdArgs)
 
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...
 

Function Documentation

◆ AddAAPCSVolatileBitfieldArgs()

void AddAAPCSVolatileBitfieldArgs ( const ArgList &  Args,
ArgStringList &  CmdArgs 
)

Definition at line 1616 of file Clang.cpp.

◆ AddARMImplicitITArgs()

static void AddARMImplicitITArgs ( const ArgList &  Args,
ArgStringList &  CmdArgs,
StringRef  Value 
)
static

Definition at line 2509 of file Clang.cpp.

◆ addCoveragePrefixMapArg()

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

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

Definition at line 708 of file Clang.cpp.

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

◆ addDashXForInput()

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

Add -x lang to CmdArgs for Input.

Definition at line 756 of file Clang.cpp.

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

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

◆ addDebugCompDirArg()

static const char* addDebugCompDirArg ( const ArgList &  Args,
ArgStringList &  CmdArgs,
const llvm::vfs::FileSystem &  VFS 
)
static

Add a CC1 option to specify the debug compilation directory.

Definition at line 630 of file Clang.cpp.

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

◆ addDebugObjectName()

static void addDebugObjectName ( const ArgList &  Args,
ArgStringList &  CmdArgs,
const char *  DebugCompilationDir,
const char *  OutputFileName 
)
static

Definition at line 648 of file Clang.cpp.

◆ addDebugPrefixMapArg()

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

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

Definition at line 672 of file Clang.cpp.

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

◆ addExceptionArgs()

static bool 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 main 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 408 of file Clang.cpp.

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

◆ addMacroPrefixMapArg()

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

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

Definition at line 693 of file Clang.cpp.

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

◆ addPGOAndCoverageFlags()

static void addPGOAndCoverageFlags ( const ToolChain TC,
Compilation C,
const Driver D,
const InputInfo Output,
const ArgList &  Args,
SanitizerArgs SanArgs,
ArgStringList &  CmdArgs 
)
static

◆ CheckARMImplicitITArg()

static bool CheckARMImplicitITArg ( StringRef  Value)
static

Definition at line 2504 of file Clang.cpp.

Referenced by CollectArgsForIntegratedAssembler().

◆ CheckCodeGenerationOptions()

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

Definition at line 76 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

◆ CheckPreprocessingOptions()

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

◆ checkRemarksOptions()

static bool checkRemarksOptions ( const Driver D,
const ArgList &  Args,
const llvm::Triple &  Triple 
)
static

Definition at line 1517 of file Clang.cpp.

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

◆ CollectArgsForIntegratedAssembler()

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

◆ CollectARMPACBTIOptions()

static void CollectARMPACBTIOptions ( const ToolChain TC,
const ArgList &  Args,
ArgStringList &  CmdArgs,
bool  isAArch64 
)
static

◆ ContainsCompileAction()

static bool ContainsCompileAction ( const Action A)
static

Check whether the given input tree contains any compilation actions.

Definition at line 1031 of file Clang.cpp.

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

Referenced by UseRelaxAll().

◆ DebugLevelToInfoKind()

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

◆ EscapeSpacesAndBackslashes()

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

Definition at line 88 of file Clang.cpp.

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

References 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.

◆ getFramePointerKind()

static CodeGenOptions::FramePointerKind getFramePointerKind ( const ArgList &  Args,
const llvm::Triple &  Triple 
)
static

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

◆ getTargetFeatures()

static void getTargetFeatures ( const Driver D,
const llvm::Triple &  Triple,
const ArgList &  Args,
ArgStringList &  CmdArgs,
bool  ForAS,
bool  IsAux = false 
)
static

◆ getWebAssemblyTargetFeatures()

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

Definition at line 295 of file Clang.cpp.

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

Referenced by getTargetFeatures().

◆ handleAMDGPUCodeObjectVersionOptions()

static void handleAMDGPUCodeObjectVersionOptions ( const Driver D,
const ArgList &  Args,
ArgStringList &  CmdArgs,
bool  IsCC1As = false 
)
static

◆ hasMultipleInvocations()

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

Definition at line 1506 of file Clang.cpp.

Referenced by checkRemarksOptions().

◆ isSignedCharDefault()

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

Definition at line 1473 of file Clang.cpp.

Referenced by RenderCharacterOptions().

◆ isValidSymbolName()

static bool isValidSymbolName ( StringRef  S)
static

Definition at line 3267 of file Clang.cpp.

Referenced by RenderSSPOptions().

◆ maybeConsumeDash()

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

Definition at line 7549 of file Clang.cpp.

Referenced by parseClangCLEHFlags().

◆ mustUseNonLeafFramePointerForTarget()

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

Definition at line 510 of file Clang.cpp.

Referenced by getFramePointerKind().

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

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

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

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

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

Referenced by RenderFloatingPointOptions().

◆ ProcessVSRuntimeLibrary()

static void ProcessVSRuntimeLibrary ( const ArgList &  Args,
ArgStringList &  CmdArgs 
)
static

Definition at line 4453 of file Clang.cpp.

◆ RenderAnalyzerOptions()

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

◆ RenderARCMigrateToolOptions()

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

Definition at line 3554 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 3626 of file Clang.cpp.

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

◆ RenderCharacterOptions()

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

Definition at line 3865 of file Clang.cpp.

References isSignedCharDefault().

◆ RenderDebugEnablingArgs()

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

◆ RenderDebugInfoCompressionArgs()

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

Definition at line 1117 of file Clang.cpp.

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

Referenced by renderDebugOptions().

◆ renderDebugOptions()

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

◆ RenderDiagnosticsOptions()

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

◆ renderDwarfFormat()

static void renderDwarfFormat ( const Driver D,
const llvm::Triple &  T,
const ArgList &  Args,
ArgStringList &  CmdArgs,
unsigned  DwarfVersion 
)
static

Definition at line 4115 of file Clang.cpp.

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

Referenced by renderDebugOptions().

◆ RenderFloatingPointOptions()

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

◆ RenderHLSLOptions()

static void RenderHLSLOptions ( const ArgList &  Args,
ArgStringList &  CmdArgs,
types::ID  InputType 
)
static

Definition at line 3531 of file Clang.cpp.

References clang::driver::types::isHLSL().

◆ RenderModulesOptions()

static bool RenderModulesOptions ( Compilation C,
const Driver D,
const ArgList &  Args,
const InputInfo Input,
const InputInfo Output,
const Arg *  Std,
ArgStringList &  CmdArgs 
)
static

◆ 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

◆ RenderOpenCLOptions()

static void RenderOpenCLOptions ( const ArgList &  Args,
ArgStringList &  CmdArgs,
types::ID  InputType 
)
static

◆ renderRemarksOptions()

static void renderRemarksOptions ( const ArgList &  Args,
ArgStringList &  CmdArgs,
const llvm::Triple &  Triple,
const InputInfo Input,
const InputInfo Output,
const JobAction JA 
)
static

◆ RenderSCPOptions()

static void RenderSCPOptions ( const ToolChain TC,
const ArgList &  Args,
ArgStringList &  CmdArgs 
)
static

Definition at line 3420 of file Clang.cpp.

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

◆ RenderSSPOptions()

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

◆ RenderTrivialAutoVarInitOptions()

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

◆ SetRISCVSmallDataLimit()

static void SetRISCVSmallDataLimit ( const ToolChain TC,
const ArgList &  Args,
ArgStringList &  CmdArgs 
)
static

◆ ShouldEnableAutolink()

static bool ShouldEnableAutolink ( const ArgList &  Args,
const ToolChain TC,
const JobAction JA 
)
static

◆ 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 disabled, while the slp vectorizer is enabled.

Definition at line 725 of file Clang.cpp.

◆ shouldUseExceptionTablesForObjCExceptions()

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

Definition at line 388 of file Clang.cpp.

References clang::ObjCRuntime::isNonFragile().

Referenced by addExceptionArgs().

◆ useFramePointerForTargetByDefault()

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

Definition at line 522 of file Clang.cpp.

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

Referenced by getFramePointerKind().

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

References ContainsCompileAction().

Referenced by CollectArgsForIntegratedAssembler().