clang 20.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/HeaderInclude.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/ScopeExit.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/BinaryFormat/Magic.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/Frontend/Debug/Options.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Support/CodeGen.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Compression.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/YAMLParser.h"
#include "llvm/TargetParser/AArch64TargetParser.h"
#include "llvm/TargetParser/ARMTargetParserCommon.h"
#include "llvm/TargetParser/Host.h"
#include "llvm/TargetParser/LoongArchTargetParser.h"
#include "llvm/TargetParser/PPCTargetParser.h"
#include "llvm/TargetParser/RISCVISAInfo.h"
#include "llvm/TargetParser/RISCVTargetParser.h"
#include <cctype>

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 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.
 
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.
 
static void ParseMRecip (const Driver &D, const ArgList &Args, ArgStringList &OutStrings)
 The -mrecip flag requires processing of many optional parameters.
 
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".
 
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.
 
static bool ShouldEnableAutolink (const ArgList &Args, const ToolChain &TC, const JobAction &JA)
 
static const char * addDebugCompDirArg (const ArgList &Args, ArgStringList &CmdArgs, const llvm::vfs::FileSystem &VFS)
 Add a CC1 option to specify the debug compilation directory.
 
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.
 
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.
 
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.
 
static bool shouldEnableVectorizerAtOLevel (const ArgList &Args, bool isSlpVec)
 Vectorize at all optimization levels greater than 1 except for -Oz.
 
static void addDashXForInput (const ArgList &Args, const InputInfo &Input, ArgStringList &CmdArgs)
 Add -x lang to CmdArgs for Input.
 
static void addPGOAndCoverageFlags (const ToolChain &TC, Compilation &C, const JobAction &JA, const InputInfo &Output, const ArgList &Args, SanitizerArgs &SanArgs, ArgStringList &CmdArgs)
 
static void RenderDebugEnablingArgs (const ArgList &Args, ArgStringList &CmdArgs, llvm::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 maybeHasClangPchSignature (const Driver &D, StringRef Path)
 
static bool gchProbe (const Driver &D, StringRef Path)
 
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 handlePAuthABI (const ArgList &DriverArgs, ArgStringList &CC1Args)
 
static void CollectARMPACBTIOptions (const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs, bool isAArch64)
 
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 std::string ComplexRangeKindToStr (LangOptions::ComplexRangeKind Range)
 
static std::string ComplexArithmeticStr (LangOptions::ComplexRangeKind Range)
 
static void EmitComplexRangeDiag (const Driver &D, std::string str1, std::string str2)
 
static std::string RenderComplexRangeOption (LangOptions::ComplexRangeKind Range)
 
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 RenderOpenACCOptions (const Driver &D, 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, bool HaveStd20, 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 IRInput, ArgStringList &CmdArgs, const InputInfo &Output, llvm::codegenoptions::DebugInfoKind &DebugInfoKind, DwarfFissionKind &DwarfFission)
 
static void ProcessVSRuntimeLibrary (const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs)
 
static bool maybeConsumeDash (const std::string &EH, size_t &I)
 
static EHFlags parseClangCLEHFlags (const Driver &D, const ArgList &Args, bool isWindowsMSVC)
 /EH controls whether to run destructor cleanups when exceptions are thrown.
 

Function Documentation

◆ AddAAPCSVolatileBitfieldArgs()

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

Definition at line 1466 of file Clang.cpp.

◆ AddARMImplicitITArgs()

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

Definition at line 2525 of file Clang.cpp.

Referenced by CollectArgsForIntegratedAssembler().

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

References D.

◆ addDashXForInput()

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

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

References Path.

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

◆ addDebugObjectName()

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

Definition at line 422 of file Clang.cpp.

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

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

References D, and clang::driver::ToolChain::GetGlobalDebugPathRemapping().

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

◆ 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 311 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().

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

References D.

◆ addPGOAndCoverageFlags()

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

◆ CheckARMImplicitITArg()

static bool CheckARMImplicitITArg ( StringRef  Value)
static

Definition at line 2520 of file Clang.cpp.

Referenced by CollectArgsForIntegratedAssembler().

◆ CheckCodeGenerationOptions()

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

Definition at line 89 of file Clang.cpp.

References D.

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

Definition at line 74 of file Clang.cpp.

References D.

◆ checkRemarksOptions()

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

◆ 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

◆ ComplexArithmeticStr()

static std::string ComplexArithmeticStr ( LangOptions::ComplexRangeKind  Range)
static

Definition at line 2858 of file Clang.cpp.

References ComplexRangeKindToStr(), clang::LangOptionsBase::CX_None, and Range.

Referenced by RenderFloatingPointOptions().

◆ ComplexRangeKindToStr()

static std::string ComplexRangeKindToStr ( LangOptions::ComplexRangeKind  Range)
static

◆ EmitComplexRangeDiag()

static void EmitComplexRangeDiag ( const Driver D,
std::string  str1,
std::string  str2 
)
static

Definition at line 2864 of file Clang.cpp.

References D.

Referenced by RenderFloatingPointOptions().

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

References clang::C, 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 clang::driver::tools::LinkerWrapper::ConstructJob().

◆ gchProbe()

static bool gchProbe ( const Driver D,
StringRef  Path 
)
static

Definition at line 951 of file Clang.cpp.

References D, maybeHasClangPchSignature(), and Path.

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

References D.

Referenced by ParseMRecip().

◆ handleAMDGPUCodeObjectVersionOptions()

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

◆ handlePAuthABI()

static void handlePAuthABI ( const ArgList &  DriverArgs,
ArgStringList &  CC1Args 
)
static

Definition at line 1507 of file Clang.cpp.

◆ hasMultipleInvocations()

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

Definition at line 1356 of file Clang.cpp.

Referenced by checkRemarksOptions().

◆ isSignedCharDefault()

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

Definition at line 1321 of file Clang.cpp.

Referenced by RenderCharacterOptions().

◆ isValidSymbolName()

static bool isValidSymbolName ( StringRef  S)
static

Definition at line 3581 of file Clang.cpp.

References clang::C.

Referenced by RenderSSPOptions().

◆ maybeConsumeDash()

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

Definition at line 8291 of file Clang.cpp.

Referenced by parseClangCLEHFlags().

◆ maybeHasClangPchSignature()

static bool maybeHasClangPchSignature ( const Driver D,
StringRef  Path 
)
static

Definition at line 934 of file Clang.cpp.

References D, and Path.

Referenced by gchProbe().

◆ parseClangCLEHFlags()

static EHFlags parseClangCLEHFlags ( const Driver D,
const ArgList &  Args,
bool  isWindowsMSVC 
)
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 8312 of file Clang.cpp.

References D, E, 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 271 of file Clang.cpp.

References D.

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

References D, and getRefinementStep().

Referenced by RenderFloatingPointOptions().

◆ ProcessVSRuntimeLibrary()

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

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

References D.

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

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

◆ RenderCharacterOptions()

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

Definition at line 4299 of file Clang.cpp.

References isSignedCharDefault(), and clang::T.

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

◆ RenderComplexRangeOption()

static std::string RenderComplexRangeOption ( LangOptions::ComplexRangeKind  Range)
static

Definition at line 2872 of file Clang.cpp.

References ComplexRangeKindToStr(), and Range.

Referenced by RenderFloatingPointOptions().

◆ RenderDebugEnablingArgs()

static void RenderDebugEnablingArgs ( const ArgList &  Args,
ArgStringList &  CmdArgs,
llvm::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 879 of file Clang.cpp.

References checkDebugInfoOption(), and D.

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  IRInput,
ArgStringList &  CmdArgs,
const InputInfo Output,
llvm::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 4548 of file Clang.cpp.

References D, and clang::T.

Referenced by clang::driver::tools::ClangAs::ConstructJob(), and 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 3904 of file Clang.cpp.

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

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

◆ RenderModulesOptions()

static bool RenderModulesOptions ( Compilation C,
const Driver D,
const ArgList &  Args,
const InputInfo Input,
const InputInfo Output,
bool  HaveStd20,
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

◆ RenderOpenACCOptions()

static void RenderOpenACCOptions ( const Driver D,
const ArgList &  Args,
ArgStringList &  CmdArgs,
types::ID  InputType 
)
static

Definition at line 3926 of file Clang.cpp.

References D.

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

◆ 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

◆ 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

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

References clang::ObjCRuntime::isNonFragile().

Referenced by addExceptionArgs().