clang 22.0.0git
clang::driver::Driver Class Reference

Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like command line arguments. More...

#include "clang/Driver/Driver.h"

Classes

struct  CompilationDiagnosticReport
 Contains the files in the compilation diagnostic report generated by generateCompilationDiagnostics. More...

Public Types

enum  OpenMPRuntimeKind { OMPRT_Unknown , OMPRT_OMP , OMPRT_GOMP , OMPRT_IOMP5 }
typedef SmallVector< std::string, 4 > prefix_list
 A prefix directory used to emulate a limited subset of GCC's '-Bprefix' functionality.
using InputTy = std::pair<types::ID, const llvm::opt::Arg *>
 An input type and its arguments.
using InputList = SmallVector<InputTy, 16>
 A list of inputs and their types for the given arguments.
using CC1ToolFunc
 Pointer to the ExecuteCC1Tool function, if available.

Public Member Functions

DiagnosticBuilder Diag (unsigned DiagID) const
bool CCCIsCXX () const
 Whether the driver should follow g++ like behavior.
bool CCCIsCPP () const
 Whether the driver is just the preprocessor.
bool CCCIsCC () const
 Whether the driver should follow gcc like behavior.
bool IsCLMode () const
 Whether the driver should follow cl.exe like behavior.
bool IsFlangMode () const
 Whether the driver should invoke flang for fortran inputs.
bool IsDXCMode () const
 Whether the driver should follow dxc.exe like behavior.
phases::ID getFinalPhase (const llvm::opt::DerivedArgList &DAL, llvm::opt::Arg **FinalPhaseArg=nullptr) const
llvm::Expected< std::unique_ptr< llvm::MemoryBuffer > > executeProgram (llvm::ArrayRef< llvm::StringRef > Args) const
 Driver (StringRef ClangExecutable, StringRef TargetTriple, DiagnosticsEngine &Diags, std::string Title="clang LLVM compiler", IntrusiveRefCntPtr< llvm::vfs::FileSystem > VFS=nullptr)
Accessors
const std::string & getCCCGenericGCCName () const
 Name to use when invoking gcc/g++.
llvm::ArrayRef< std::string > getConfigFiles () const
const llvm::opt::OptTable & getOpts () const
DiagnosticsEnginegetDiags () const
llvm::vfs::FileSystem & getVFS () const
bool getCheckInputsExist () const
void setCheckInputsExist (bool Value)
bool getProbePrecompiled () const
void setProbePrecompiled (bool Value)
const char * getPrependArg () const
void setPrependArg (const char *Value)
void setTargetAndMode (const ParsedClangName &TM)
const std::string & getTitle ()
void setTitle (std::string Value)
std::string getTargetTriple () const
const char * getClangProgramPath () const
 Get the path to the main clang executable.
StringRef getPreferredLinker () const
void setPreferredLinker (std::string Value)
bool isSaveTempsEnabled () const
bool isSaveTempsObj () const
bool embedBitcodeEnabled () const
bool embedBitcodeInObject () const
bool embedBitcodeMarkerOnly () const
bool offloadHostOnly () const
bool offloadDeviceOnly () const
void setFlangF128MathLibrary (std::string name)
StringRef getFlangF128MathLibrary () const
OpenMPRuntimeKind getOpenMPRuntime (const llvm::opt::ArgList &Args) const
 Compute the desired OpenMP runtime from the flags provided.

Static Public Member Functions

static std::string GetResourcesPath (StringRef BinaryPath)
 Takes the path to a binary that's either in bin/ or lib/ and returns the path to clang's resource directory.

Public Attributes

std::string Name
 The name the driver was invoked as.
std::string Dir
 The path the driver executable was in, as invoked from the command line.
std::string ClangExecutable
 The original path to the clang executable.
ParsedClangName ClangNameParts
 Target and driver mode components extracted from clang executable name.
std::string ResourceDir
 The path to the compiler resource directory.
std::string SystemConfigDir
 System directory for config files.
std::string UserConfigDir
 User directory for config files.
prefix_list PrefixDirs
std::string SysRoot
 sysroot, if present
std::string DyldPrefix
 Dynamic loader prefix, if present.
std::string DriverTitle
 Driver title to use with help.
std::string HostBits
 Information about the host which can be overridden by the user.
std::string HostMachine
std::string HostSystem
std::string HostRelease
std::string CCPrintStatReportFilename
 The file to log CC_PRINT_PROC_STAT_FILE output to, if enabled.
std::string CCPrintInternalStatReportFilename
 The file to log CC_PRINT_INTERNAL_STAT_FILE output to, if enabled.
std::string CCPrintOptionsFilename
 The file to log CC_PRINT_OPTIONS output to, if enabled.
std::string CCPrintHeadersFilename
 The file to log CC_PRINT_HEADERS output to, if enabled.
std::string CCLogDiagnosticsFilename
 The file to log CC_LOG_DIAGNOSTICS output to, if enabled.
unsigned CCCPrintBindings: 1
 Only print tool bindings, don't build any jobs.
unsigned CCPrintOptions: 1
 Set CC_PRINT_OPTIONS mode, which is like -v but logs the commands to CCPrintOptionsFilename or to stderr.
HeaderIncludeFormatKind CCPrintHeadersFormat = HIFMT_None
 The format of the header information that is emitted.
HeaderIncludeFilteringKind CCPrintHeadersFiltering = HIFIL_None
 This flag determines whether clang should filter the header information that is emitted.
std::string FlangF128MathLibrary
 Name of the library that provides implementations of IEEE-754 128-bit float math functions used by Fortran F128 runtime library.
unsigned CCLogDiagnostics: 1
 Set CC_LOG_DIAGNOSTICS mode, which causes the frontend to log diagnostics to CCLogDiagnosticsFilename or to stderr, in a stable machine readable format.
unsigned CCGenDiagnostics: 1
 Whether the driver is generating diagnostics for debugging purposes.
unsigned CCPrintProcessStats: 1
 Set CC_PRINT_PROC_STAT mode, which causes the driver to dump performance report to CC_PRINT_PROC_STAT_FILE or to stdout.
unsigned CCPrintInternalStats: 1
 Set CC_PRINT_INTERNAL_STAT mode, which causes the driver to dump internal performance report to CC_PRINT_INTERNAL_STAT_FILE or to stdout.
CC1ToolFunc CC1Main = nullptr

Primary Functionality

enum class  CommandStatus { Crash = 1 , Error , Ok }
enum class  ReproLevel { Off = 0 , OnCrash = static_cast<int>(CommandStatus::Crash) , OnError = static_cast<int>(CommandStatus::Error) , Always = static_cast<int>(CommandStatus::Ok) }
void CreateOffloadingDeviceToolChains (Compilation &C, InputList &Inputs)
 CreateOffloadingDeviceToolChains - create all the toolchains required to support offloading devices given the programming models specified in the current compilation.
CompilationBuildCompilation (ArrayRef< const char * > Args)
 BuildCompilation - Construct a compilation object for a command line argument vector.
llvm::opt::InputArgList ParseArgStrings (ArrayRef< const char * > Args, bool UseDriverMode, bool &ContainsError) const
 ParseArgStrings - Parse the given list of strings into an ArgList.
void BuildInputs (const ToolChain &TC, llvm::opt::DerivedArgList &Args, InputList &Inputs) const
 BuildInputs - Construct the list of inputs and their types from the given arguments.
void BuildActions (Compilation &C, llvm::opt::DerivedArgList &Args, const InputList &Inputs, ActionList &Actions) const
 BuildActions - Construct the list of actions to perform for the given arguments, which are only done for a single architecture.
void BuildUniversalActions (Compilation &C, const ToolChain &TC, const InputList &BAInputs) const
 BuildUniversalActions - Construct the list of actions to perform for the given arguments, which may require a universal build.
ActionBuildOffloadingActions (Compilation &C, llvm::opt::DerivedArgList &Args, const InputTy &Input, StringRef CUID, Action *HostAction) const
 BuildOffloadingActions - Construct the list of actions to perform for the offloading toolchain that will be embedded in the host.
llvm::SmallVector< StringRef > getOffloadArchs (Compilation &C, const llvm::opt::DerivedArgList &Args, Action::OffloadKind Kind, const ToolChain &TC) const
 Returns the set of bound architectures active for this offload kind.
bool DiagnoseInputExistence (const llvm::opt::DerivedArgList &Args, StringRef Value, types::ID Ty, bool TypoCorrect) const
 Check that the file referenced by Value exists.
void BuildJobs (Compilation &C) const
 BuildJobs - Bind actions to concrete tools and translate arguments to form the list of jobs to run.
int ExecuteCompilation (Compilation &C, SmallVectorImpl< std::pair< int, const Command * > > &FailingCommands)
 ExecuteCompilation - Execute the compilation according to the command line arguments and return an appropriate exit code.
void generateCompilationDiagnostics (Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation="", CompilationDiagnosticReport *GeneratedReport=nullptr)
 generateCompilationDiagnostics - Generate diagnostics information including preprocessed source file(s).
bool maybeGenerateCompilationDiagnostics (CommandStatus CS, ReproLevel Level, Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation="", CompilationDiagnosticReport *GeneratedReport=nullptr)

Helper Methods

void PrintActions (const Compilation &C) const
 PrintActions - Print the list of actions.
void PrintHelp (bool ShowHidden) const
 PrintHelp - Print the help text.
void PrintVersion (const Compilation &C, raw_ostream &OS) const
 PrintVersion - Print the driver version.
std::string GetFilePath (StringRef Name, const ToolChain &TC) const
 GetFilePath - Lookup Name in the list of file search paths.
std::string GetProgramPath (StringRef Name, const ToolChain &TC) const
 GetProgramPath - Lookup Name in the list of program search paths.
std::string GetStdModuleManifestPath (const Compilation &C, const ToolChain &TC) const
 Lookup the path to the Standard library module manifest.
void HandleAutocompletions (StringRef PassedFlags) const
 HandleAutocompletions - Handle –autocomplete by searching and printing possible flags, descriptions, and its arguments.
bool HandleImmediateArgs (Compilation &C)
 HandleImmediateArgs - Handle any arguments which should be treated before building actions or binding tools.
ActionConstructPhaseAction (Compilation &C, const llvm::opt::ArgList &Args, phases::ID Phase, Action *Input, Action::OffloadKind TargetDeviceOffloadKind=Action::OFK_None) const
 ConstructAction - Construct the appropriate action to do for Phase on the Input, taking in to account arguments like -fsyntax-only or –analyze.
InputInfoList BuildJobsForAction (Compilation &C, const Action *A, const ToolChain *TC, StringRef BoundArch, bool AtTopLevel, bool MultipleArchs, const char *LinkingOutput, std::map< std::pair< const Action *, std::string >, InputInfoList > &CachedResults, Action::OffloadKind TargetDeviceOffloadKind) const
 BuildJobsForAction - Construct the jobs to perform for the action A and return an InputInfo for the result of running A.
const char * getDefaultImageName () const
 Returns the default name for linked images (e.g., "a.out").
const char * CreateTempFile (Compilation &C, StringRef Prefix, StringRef Suffix, bool MultipleArchs=false, StringRef BoundArch={}, bool NeedUniqueDirectory=false) const
 Creates a temp file.
const char * GetNamedOutputPath (Compilation &C, const JobAction &JA, const char *BaseInput, StringRef BoundArch, bool AtTopLevel, bool MultipleArchs, StringRef NormalizedTriple) const
 GetNamedOutputPath - Return the name to use for the output of the action JA.
std::string GetTemporaryPath (StringRef Prefix, StringRef Suffix) const
 GetTemporaryPath - Return the pathname of a temporary file to use as part of compilation; the file will have the given prefix and suffix.
std::string GetTemporaryDirectory (StringRef Prefix) const
 GetTemporaryDirectory - Return the pathname of a temporary directory to use as part of compilation; the directory will have the given prefix.
std::string GetClPchPath (Compilation &C, StringRef BaseName) const
 Return the pathname of the pch file in clang-cl mode.
bool ShouldUseClangCompiler (const JobAction &JA) const
 ShouldUseClangCompiler - Should the clang compiler be used to handle this action.
bool ShouldUseFlangCompiler (const JobAction &JA) const
 ShouldUseFlangCompiler - Should the flang compiler be used to handle this action.
bool ShouldEmitStaticLibrary (const llvm::opt::ArgList &Args) const
 ShouldEmitStaticLibrary - Should the linker emit a static library.
bool hasHeaderMode () const
 Returns true if the user has indicated a C++20 header unit mode.
ModuleHeaderMode getModuleHeaderMode () const
 Get the mode for handling headers as set by fmodule-header{=}.
bool isUsingLTO () const
 Returns true if we are performing any kind of LTO.
LTOKind getLTOMode () const
 Get the specific kind of LTO being performed.
bool isUsingOffloadLTO () const
 Returns true if we are performing any kind of offload LTO.
LTOKind getOffloadLTOMode () const
 Get the specific kind of offload LTO being performed.
const CUIDOptionsgetCUIDOpts () const
 Get the CUID option.
static bool GetReleaseVersion (StringRef Str, unsigned &Major, unsigned &Minor, unsigned &Micro, bool &HadExtra)
 GetReleaseVersion - Parse (([0-9]+)(.
static bool GetReleaseVersion (StringRef Str, MutableArrayRef< unsigned > Digits)
 Parse digits from a string Str and fulfill Digits with the parsed numbers.
static bool getDefaultModuleCachePath (SmallVectorImpl< char > &Result)
 Compute the default -fmodule-cache-path.

Detailed Description

Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like command line arguments.

Definition at line 99 of file Driver.h.

Member Typedef Documentation

◆ CC1ToolFunc

Initial value:

Pointer to the ExecuteCC1Tool function, if available.

When the clangDriver lib is used through clang.exe, this provides a shortcut for executing the -cc1 command-line directly, in the same process.

Definition at line 305 of file Driver.h.

◆ InputList

A list of inputs and their types for the given arguments.

Definition at line 235 of file Driver.h.

◆ InputTy

using clang::driver::Driver::InputTy = std::pair<types::ID, const llvm::opt::Arg *>

An input type and its arguments.

Definition at line 232 of file Driver.h.

◆ prefix_list

A prefix directory used to emulate a limited subset of GCC's '-Bprefix' functionality.

FIXME: This type of customization should be removed in favor of the universal driver when it is ready.

Definition at line 201 of file Driver.h.

Member Enumeration Documentation

◆ CommandStatus

Enumerator
Crash 
Error 
Ok 

Definition at line 590 of file Driver.h.

◆ OpenMPRuntimeKind

Enumerator
OMPRT_Unknown 

An unknown OpenMP runtime.

We can't generate effective OpenMP code without knowing what runtime to target.

OMPRT_OMP 

The LLVM OpenMP runtime.

When completed and integrated, this will become the default for Clang.

OMPRT_GOMP 

The GNU OpenMP runtime.

Clang doesn't support generating OpenMP code for this runtime but can swallow the pragmas, and find and link against the runtime library itself.

OMPRT_IOMP5 

The legacy name for the LLVM OpenMP runtime from when it was the Intel OpenMP runtime.

We support this mode for users with existing dependencies on this runtime library name.

Definition at line 148 of file Driver.h.

◆ ReproLevel

Enumerator
Off 
OnCrash 
OnError 
Always 

Definition at line 596 of file Driver.h.

Constructor & Destructor Documentation

◆ Driver()

Driver::Driver ( StringRef ClangExecutable,
StringRef TargetTriple,
DiagnosticsEngine & Diags,
std::string Title = "clang LLVM compiler",
IntrusiveRefCntPtr< llvm::vfs::FileSystem > VFS = nullptr )

Member Function Documentation

◆ BuildActions()

void Driver::BuildActions ( Compilation & C,
llvm::opt::DerivedArgList & Args,
const InputList & Inputs,
ActionList & Actions ) const

BuildActions - Construct the list of actions to perform for the given arguments, which are only done for a single architecture.

If the compilation is an explicit module build, delegates to BuildDriverManagedModuleBuildActions. Otherwise, BuildDefaultActions is used.

Parameters
C- The compilation that is being built.
Args- The input arguments.
Actions- The list to store the resulting actions onto.

Definition at line 4350 of file Driver.cpp.

References clang::C, Diag(), and hasCXXModuleInputType().

Referenced by BuildCompilation(), BuildUniversalActions(), and generateCompilationDiagnostics().

◆ BuildCompilation()

◆ BuildInputs()

void Driver::BuildInputs ( const ToolChain & TC,
llvm::opt::DerivedArgList & Args,
InputList & Inputs ) const

BuildInputs - Construct the list of inputs and their types from the given arguments.

Parameters
TC- The default host tool chain.
Args- The input arguments.
Inputs- The list to store the resulting compilation inputs onto.

Definition at line 2935 of file Driver.cpp.

References CCCIsCPP(), CCCIsCXX(), CCGenDiagnostics, CXXHeaderUnitType(), Diag(), DiagnoseInputExistence(), clang::driver::Action::getKind(), getOpts(), hasHeaderMode(), IsCLMode(), IsDXCMode(), IsFlangMode(), clang::driver::options::LinkerInput, clang::driver::types::lookupCXXTypeForCType(), clang::driver::ToolChain::LookupTypeForExtension(), clang::driver::types::lookupTypeForTypeSpecifier(), MakeInputArg(), Previous, and clang::driver::types::TY_INVALID.

Referenced by BuildCompilation(), and generateCompilationDiagnostics().

◆ BuildJobs()

◆ BuildJobsForAction()

InputInfoList Driver::BuildJobsForAction ( Compilation & C,
const Action * A,
const ToolChain * TC,
StringRef BoundArch,
bool AtTopLevel,
bool MultipleArchs,
const char * LinkingOutput,
std::map< std::pair< const Action *, std::string >, InputInfoList > & CachedResults,
Action::OffloadKind TargetDeviceOffloadKind ) const

BuildJobsForAction - Construct the jobs to perform for the action A and return an InputInfo for the result of running A.

Will only construct jobs for a given (Action, ToolChain, BoundArch, DeviceKind) tuple once.

Definition at line 5771 of file Driver.cpp.

References clang::C, GetTriplePlusArchString(), and clang::Result.

Referenced by BuildJobs().

◆ BuildOffloadingActions()

◆ BuildUniversalActions()

void Driver::BuildUniversalActions ( Compilation & C,
const ToolChain & TC,
const InputList & BAInputs ) const

BuildUniversalActions - Construct the list of actions to perform for the given arguments, which may require a universal build.

Parameters
C- The compilation that is being built.
TC- The default host tool chain.

Definition at line 2757 of file Driver.cpp.

References Arch, clang::ArchNames, BuildActions(), clang::C, clang::driver::types::canLipoType(), ContainsCompileOrAssembleAction(), Diag(), clang::driver::tools::darwin::getArchTypeForMachOArchName(), clang::driver::ToolChain::getDefaultUniversalArchName(), clang::driver::types::getTypeName(), and clang::driver::willEmitRemarks().

Referenced by BuildCompilation(), and generateCompilationDiagnostics().

◆ CCCIsCC()

bool clang::driver::Driver::CCCIsCC ( ) const
inline

Whether the driver should follow gcc like behavior.

Definition at line 244 of file Driver.h.

◆ CCCIsCPP()

bool clang::driver::Driver::CCCIsCPP ( ) const
inline

Whether the driver is just the preprocessor.

Definition at line 241 of file Driver.h.

Referenced by BuildInputs(), CheckPreprocessingOptions(), and getFinalPhase().

◆ CCCIsCXX()

◆ ConstructPhaseAction()

◆ CreateOffloadingDeviceToolChains()

void Driver::CreateOffloadingDeviceToolChains ( Compilation & C,
InputList & Inputs )

CreateOffloadingDeviceToolChains - create all the toolchains required to support offloading devices given the programming models specified in the current compilation.

Also, update the host tool chain kind accordingly.

Definition at line 1041 of file Driver.cpp.

References clang::C, Diag(), clang::driver::Action::GetOffloadKindName(), getOpenMPRuntime(), clang::driver::ToolChain::getOpenMPTriple(), hasFlag(), inferOffloadToolchains(), clang::driver::types::isCuda(), clang::driver::types::isHIP(), clang::driver::Action::OFK_Cuda, clang::driver::Action::OFK_HIP, clang::driver::Action::OFK_OpenMP, clang::driver::Action::OFK_SYCL, OMPRT_IOMP5, OMPRT_OMP, and clang::Target.

Referenced by BuildCompilation().

◆ CreateTempFile()

const char * Driver::CreateTempFile ( Compilation & C,
StringRef Prefix,
StringRef Suffix,
bool MultipleArchs = false,
StringRef BoundArch = {},
bool NeedUniqueDirectory = false ) const

Creates a temp file.

  1. If MultipleArch is false or BoundArch is empty, the temp file is in the temporary directory with name $Prefix-%%%%%%.$Suffix.
  2. If MultipleArch is true and BoundArch is not empty, 2a. If NeedUniqueDirectory is false, the temp file is in the temporary directory with name $Prefix-$BoundArch-%%%%%.$Suffix. 2b. If NeedUniqueDirectory is true, the temp file is in a unique subdiretory with random name under the temporary directory, and the temp file itself has name $Prefix-$BoundArch.$Suffix.

Definition at line 6153 of file Driver.cpp.

References clang::C, CCGenDiagnostics, Diag(), GetTemporaryDirectory(), GetTemporaryPath(), and getVFS().

Referenced by generateCompilationDiagnostics(), and GetNamedOutputPath().

◆ Diag()

DiagnosticBuilder clang::driver::Driver::Diag ( unsigned DiagID) const
inline

Definition at line 169 of file Driver.h.

Referenced by clang::driver::SanitizerArgs::addArgs(), clang::driver::XRayArgs::addArgs(), clang::driver::toolchains::CudaToolChain::addClangTargetOptions(), addCoveragePrefixMapArg(), clang::driver::toolchains::HexagonToolChain::AddCXXStdlibLibArgs(), addDebugPrefixMapArg(), addDefaultIgnorelists(), addFloatingPointOptions(), clang::driver::toolchains::HIPSPVToolChain::AddHIPIncludeArgs(), clang::driver::toolchains::DarwinClang::AddLinkARCArgs(), clang::driver::tools::addLinkerCompressDebugSectionsOption(), clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), clang::driver::tools::addMachineOutlinerArgs(), addMacroPrefixMapArg(), clang::driver::tools::addMCModel(), clang::driver::tools::addOpenCLBuiltinsLib(), clang::driver::tools::addOpenMPDeviceRTL(), clang::driver::tools::addOutlineAtomicsArgs(), addPGOAndCoverageFlags(), addPgProfilingLinkArgs(), clang::driver::tools::ClangAs::AddX86TargetArgs(), BuildActions(), clang::driver::toolchains::MSVCToolChain::buildAssembler(), BuildCompilation(), BuildInputs(), BuildJobs(), BuildUniversalActions(), clang::driver::tools::checkAMDGPUCodeObjectVersion(), checkARMArchName(), checkARMCPUName(), checkARMFloatABI(), CheckCodeGenerationOptions(), checkDebugInfoOption(), clang::driver::toolchains::Darwin::CheckObjCARC(), CheckPreprocessingOptions(), checkRemarksOptions(), checkRemarksOptions(), clang::driver::toolchains::AMDGPUToolChain::checkTargetID(), clang::driver::toolchains::HIPAMDToolChain::checkTargetID(), clang::driver::Compilation::CleanupFile(), CollectArgsForIntegratedAssembler(), CollectARMPACBTIOptions(), computeTargetTriple(), clang::driver::tools::aix::Assembler::ConstructJob(), clang::driver::tools::aix::Linker::ConstructJob(), clang::driver::tools::AVR::Linker::ConstructJob(), clang::driver::tools::baremetal::Linker::ConstructJob(), clang::driver::tools::baremetal::StaticLibTool::ConstructJob(), clang::driver::tools::Clang::ConstructJob(), clang::driver::tools::CrossWindows::Linker::ConstructJob(), clang::driver::tools::darwin::Linker::ConstructJob(), clang::driver::tools::darwin::StaticLibTool::ConstructJob(), clang::driver::tools::Flang::ConstructJob(), clang::driver::tools::fuchsia::StaticLibTool::ConstructJob(), clang::driver::tools::gcc::Common::ConstructJob(), clang::driver::tools::gnutools::Linker::ConstructJob(), clang::driver::tools::gnutools::StaticLibTool::ConstructJob(), clang::driver::tools::hexagon::Assembler::ConstructJob(), clang::driver::tools::MinGW::Linker::ConstructJob(), clang::driver::tools::PS4cpu::Linker::ConstructJob(), clang::driver::tools::PS5cpu::Linker::ConstructJob(), clang::driver::tools::wasm::Linker::ConstructJob(), CreateOffloadingDeviceToolChains(), CreateTempFile(), DecodeAArch64Features(), DiagnoseInputExistence(), DiagnoseUnclaimedMultilibCustomFlags(), EmitComplexRangeDiag(), clang::driver::Compilation::ExecuteCommand(), ExecuteCompilation(), findMultilibsFromYAML(), findPassPlugin(), gchProbe(), generateCompilationDiagnostics(), getARMFPUFeatures(), getARMHWDivFeatures(), getCSKYFPUFeatures(), clang::driver::ToolChain::GetCXXStdlibType(), clang::driver::toolchains::Fuchsia::GetCXXStdlibType(), clang::driver::toolchains::HexagonToolChain::GetCXXStdlibType(), clang::driver::toolchains::MipsLLVMToolChain::GetCXXStdlibType(), clang::driver::toolchains::OHOS::GetCXXStdlibType(), clang::driver::toolchains::HIPAMDToolChain::getDeviceLibs(), clang::driver::toolchains::HIPSPVToolChain::getDeviceLibs(), clang::driver::tools::getDwarfVersion(), clang::driver::ToolChain::GetLinkerPath(), clang::driver::tools::solaris::Linker::getLinkerPath(), clang::driver::tools::wasm::Linker::getLinkerPath(), clang::driver::toolchains::MachO::getLinkerVersion(), getMultilibConfigPath(), GetNamedOutputPath(), getOffloadArchs(), getOpenMPRuntime(), getRISCFeaturesFromMcpu(), clang::driver::ToolChain::GetRuntimeLibType(), clang::driver::toolchains::DarwinClang::GetRuntimeLibType(), clang::driver::toolchains::Fuchsia::GetRuntimeLibType(), clang::driver::toolchains::OHOS::GetRuntimeLibType(), clang::driver::tools::getStatsFileName(), GetTemporaryDirectory(), GetTemporaryPath(), clang::driver::ToolChain::GetUnwindLibType(), handleHVXTargetFeatures(), handleHVXWarnings(), clang::driver::tools::isTLSDESCEnabled(), parseArgCutoffs(), ParseArgStrings(), parseArgValues(), parseBinaryMetadataFeatures(), parseClangCLEHFlags(), parseCoverageFeatures(), ParseDebugDefaultVersion(), parseLTOMode(), parseOverflowPatternExclusionValues(), parseSanitizeArgs(), parseSpecialCaseListArg(), RenderDebugInfoCompressionArgs(), renderDebugOptions(), RenderDiagnosticsOptions(), renderDwarfFormat(), clang::driver::tools::gcc::Compiler::RenderExtraToolArgs(), RenderFloatingPointOptions(), RenderModulesOptions(), RenderObjCOptions(), RenderSSPOptions(), RenderTrivialAutoVarInitOptions(), clang::driver::toolchains::HLSLToolChain::requiresValidation(), clang::driver::SanitizerArgs::SanitizerArgs(), setZosTargetVersion(), clang::driver::tools::shouldRecordCommandLine(), clang::driver::toolchains::AMDGPUToolChain::TranslateArgs(), clang::driver::toolchains::Darwin::TranslateArgs(), clang::driver::toolchains::HLSLToolChain::TranslateArgs(), clang::driver::ToolChain::TranslateOpenMPTargetArgs(), clang::driver::ToolChain::TranslateXarchArgs(), validateSpecialCaseListFormat(), and clang::driver::XRayArgs::XRayArgs().

◆ DiagnoseInputExistence()

bool Driver::DiagnoseInputExistence ( const llvm::opt::DerivedArgList & Args,
StringRef Value,
types::ID Ty,
bool TypoCorrect ) const

Check that the file referenced by Value exists.

If it doesn't, issue a diagnostic and return false. If TypoCorrect is true and the file does not exist, see if it looks like a likely typo for a flag and if so print a "did you mean" blurb.

Definition at line 2844 of file Driver.cpp.

References Diag(), getCheckInputsExist(), getOpts(), getVFS(), and IsCLMode().

Referenced by BuildInputs().

◆ embedBitcodeEnabled()

bool clang::driver::Driver::embedBitcodeEnabled ( ) const
inline

Definition at line 464 of file Driver.h.

◆ embedBitcodeInObject()

bool clang::driver::Driver::embedBitcodeInObject ( ) const
inline

Definition at line 465 of file Driver.h.

◆ embedBitcodeMarkerOnly()

bool clang::driver::Driver::embedBitcodeMarkerOnly ( ) const
inline

Definition at line 466 of file Driver.h.

◆ ExecuteCompilation()

int Driver::ExecuteCompilation ( Compilation & C,
SmallVectorImpl< std::pair< int, const Command * > > & FailingCommands )

ExecuteCompilation - Execute the compilation according to the command line arguments and return an appropriate exit code.

This routine handles additional processing that must be done in addition to just running the subprocesses, for example reporting errors, setting up response files, removing temporary files, etc.

Definition at line 2211 of file Driver.cpp.

References clang::C, clang::cast(), Diag(), clang::driver::Command::getCreator(), clang::driver::Tool::getShortName(), clang::driver::Command::getSource(), clang::driver::Tool::hasGoodDiagnostics(), and isSaveTempsEnabled().

◆ executeProgram()

llvm::Expected< std::unique_ptr< llvm::MemoryBuffer > > Driver::executeProgram ( llvm::ArrayRef< llvm::StringRef > Args) const

◆ generateCompilationDiagnostics()

◆ getCCCGenericGCCName()

const std::string & clang::driver::Driver::getCCCGenericGCCName ( ) const
inline

Name to use when invoking gcc/g++.

Definition at line 422 of file Driver.h.

References getCCCGenericGCCName().

Referenced by clang::driver::tools::gcc::Common::ConstructJob(), and getCCCGenericGCCName().

◆ getCheckInputsExist()

bool clang::driver::Driver::getCheckInputsExist ( ) const
inline

Definition at line 434 of file Driver.h.

Referenced by DiagnoseInputExistence().

◆ getClangProgramPath()

const char * clang::driver::Driver::getClangProgramPath ( ) const
inline

Get the path to the main clang executable.

Definition at line 452 of file Driver.h.

References ClangExecutable.

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

◆ GetClPchPath()

std::string Driver::GetClPchPath ( Compilation & C,
StringRef BaseName ) const

Return the pathname of the pch file in clang-cl mode.

Definition at line 6694 of file Driver.cpp.

References clang::C.

Referenced by GetNamedOutputPath().

◆ getConfigFiles()

llvm::ArrayRef< std::string > clang::driver::Driver::getConfigFiles ( ) const
inline

Definition at line 424 of file Driver.h.

◆ getCUIDOpts()

const CUIDOptions & clang::driver::Driver::getCUIDOpts ( ) const
inline

Get the CUID option.

Definition at line 767 of file Driver.h.

◆ getDefaultImageName()

const char * Driver::getDefaultImageName ( ) const

Returns the default name for linked images (e.g., "a.out").

Definition at line 6104 of file Driver.cpp.

References clang::Target.

Referenced by BuildJobs(), and GetNamedOutputPath().

◆ getDefaultModuleCachePath()

bool Driver::getDefaultModuleCachePath ( SmallVectorImpl< char > & Result)
static

Compute the default -fmodule-cache-path.

Returns
True if the system provides a default cache directory.

Definition at line 3850 of file Clang.cpp.

References clang::Result.

Referenced by RenderModulesOptions().

◆ getDiags()

◆ GetFilePath()

std::string Driver::GetFilePath ( StringRef Name,
const ToolChain & TC ) const

GetFilePath - Lookup Name in the list of file search paths.

Parameters
TC- The tool chain for additional information on directories to search.

Definition at line 6505 of file Driver.cpp.

References Dir, clang::driver::ToolChain::getCompilerRTPath(), clang::driver::ToolChain::getFilePaths(), clang::driver::ToolChain::getLibraryPaths(), Name, PrefixDirs, ResourceDir, and SysRoot.

Referenced by GetStdModuleManifestPath(), and HandleImmediateArgs().

◆ getFinalPhase()

◆ getFlangF128MathLibrary()

StringRef clang::driver::Driver::getFlangF128MathLibrary ( ) const
inline

Definition at line 474 of file Driver.h.

References FlangF128MathLibrary.

Referenced by clang::driver::ToolChain::addFortranRuntimeLibs().

◆ getLTOMode()

◆ getModuleHeaderMode()

ModuleHeaderMode clang::driver::Driver::getModuleHeaderMode ( ) const
inline

Get the mode for handling headers as set by fmodule-header{=}.

Definition at line 752 of file Driver.h.

◆ GetNamedOutputPath()

const char * Driver::GetNamedOutputPath ( Compilation & C,
const JobAction & JA,
const char * BaseInput,
StringRef BoundArch,
bool AtTopLevel,
bool MultipleArchs,
StringRef NormalizedTriple ) const

GetNamedOutputPath - Return the name to use for the output of the action JA.

The result is appended to the compilation's list of temporary or result files, as appropriate.

Parameters
C- The compilation.
JA- The action of interest.
BaseInput- The original input file that this action was triggered by.
BoundArch- The bound architecture.
AtTopLevel- Whether this is a "top-level" action.
MultipleArchs- Whether multiple -arch options were supplied.
NormalizedTriple- The normalized triple of the relevant target.

Definition at line 6215 of file Driver.cpp.

References clang::driver::types::appendSuffixForType(), clang::C, CCGenDiagnostics, CreateTempFile(), Diag(), GetClPchPath(), getDefaultImageName(), clang::driver::Action::getKind(), GetModuleOutputPath(), clang::driver::Action::getOffloadingDeviceKind(), clang::driver::Action::getOffloadingToolChain(), GetTemporaryPath(), clang::driver::ToolChain::getTriple(), clang::driver::Action::getType(), clang::driver::types::getTypeTempSuffix(), HasPreprocessOutput(), clang::isa(), IsCLMode(), IsDXCMode(), isSaveTempsEnabled(), isSaveTempsObj(), MakeCLOutputFilename(), Name, clang::driver::Action::OFK_HIP, clang::driver::Action::OFK_Host, clang::driver::Action::OFK_None, clang::driver::Action::OFK_OpenMP, and clang::Result.

◆ getOffloadArchs()

llvm::SmallVector< StringRef > Driver::getOffloadArchs ( Compilation & C,
const llvm::opt::DerivedArgList & Args,
Action::OffloadKind Kind,
const ToolChain & TC ) const

◆ getOffloadLTOMode()

LTOKind clang::driver::Driver::getOffloadLTOMode ( ) const
inline

Get the specific kind of offload LTO being performed.

Definition at line 764 of file Driver.h.

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

◆ getOpenMPRuntime()

◆ getOpts()

◆ getPreferredLinker()

StringRef clang::driver::Driver::getPreferredLinker ( ) const
inline

Definition at line 456 of file Driver.h.

Referenced by clang::driver::ToolChain::GetLinkerPath().

◆ getPrependArg()

const char * clang::driver::Driver::getPrependArg ( ) const
inline

◆ getProbePrecompiled()

bool clang::driver::Driver::getProbePrecompiled ( ) const
inline

Definition at line 438 of file Driver.h.

◆ GetProgramPath()

std::string Driver::GetProgramPath ( StringRef Name,
const ToolChain & TC ) const

GetProgramPath - Lookup Name in the list of program search paths.

Parameters
TC- The provided tool chain for additional information on directories to search.

Definition at line 6570 of file Driver.cpp.

References clang::driver::ToolChain::getProgramPaths(), Name, PrefixDirs, and ScanDirForExecutable().

Referenced by clang::driver::tools::Flang::ConstructJob(), and HandleImmediateArgs().

◆ GetReleaseVersion() [1/2]

bool Driver::GetReleaseVersion ( StringRef Str,
MutableArrayRef< unsigned > Digits )
static

Parse digits from a string Str and fulfill Digits with the parsed numbers.

This method assumes that the max number of digits to look for is equal to Digits.size().

Returns
True if the entire string was parsed and there are no extra characters remaining at the end.

Definition at line 7061 of file Driver.cpp.

◆ GetReleaseVersion() [2/2]

bool Driver::GetReleaseVersion ( StringRef Str,
unsigned & Major,
unsigned & Minor,
unsigned & Micro,
bool & HadExtra )
static

GetReleaseVersion - Parse (([0-9]+)(.

([0-9]+)(.([0-9]+)?))?)? and return the grouped values as integers. Numbers which are not provided are set to 0.

Returns
True if the entire string was parsed (9.2), or all groups were parsed (10.3.5extrastuff). HadExtra is true if all groups were parsed but extra characters remain at the end.

([0-9]+)(.([0-9]+)?))?)? and return the grouped values as integers. Numbers which are not provided are set to 0.

Returns
True if the entire string was parsed (9.2), or all groups were parsed (10.3.5extrastuff).

Definition at line 7026 of file Driver.cpp.

Referenced by getSystemOrSDKMacOSVersion().

◆ GetResourcesPath()

std::string Driver::GetResourcesPath ( StringRef BinaryPath)
static

Takes the path to a binary that's either in bin/ or lib/ and returns the path to clang's resource directory.

Definition at line 127 of file Driver.cpp.

References Dir.

Referenced by Driver(), and clang::CompilerInvocation::GetResourcesPath().

◆ GetStdModuleManifestPath()

std::string Driver::GetStdModuleManifestPath ( const Compilation & C,
const ToolChain & TC ) const

Lookup the path to the Standard library module manifest.

Parameters
C- The compilation.
TC- The tool chain for additional information on directories to search.

Definition at line 6612 of file Driver.cpp.

References clang::C, clang::driver::ToolChain::CST_Libcxx, clang::driver::ToolChain::CST_Libstdcxx, clang::driver::ToolChain::GetCXXStdlibType(), GetFilePath(), and clang::driver::ToolChain::getVFS().

Referenced by HandleImmediateArgs().

◆ getTargetTriple()

◆ GetTemporaryDirectory()

std::string Driver::GetTemporaryDirectory ( StringRef Prefix) const

GetTemporaryDirectory - Return the pathname of a temporary directory to use as part of compilation; the directory will have the given prefix.

Definition at line 6683 of file Driver.cpp.

References Diag().

Referenced by CreateTempFile().

◆ GetTemporaryPath()

std::string Driver::GetTemporaryPath ( StringRef Prefix,
StringRef Suffix ) const

GetTemporaryPath - Return the pathname of a temporary file to use as part of compilation; the file will have the given prefix and suffix.

GCC goes to extra lengths here to be a bit more robust.

Definition at line 6672 of file Driver.cpp.

References Diag().

Referenced by CreateTempFile(), GetNamedOutputPath(), and GetSDLFromOffloadArchive().

◆ getTitle()

const std::string & clang::driver::Driver::getTitle ( )
inline

Definition at line 446 of file Driver.h.

References DriverTitle.

◆ getVFS()

◆ HandleAutocompletions()

void Driver::HandleAutocompletions ( StringRef PassedFlags) const

HandleAutocompletions - Handle –autocomplete by searching and printing possible flags, descriptions, and its arguments.

Definition at line 2345 of file Driver.cpp.

References clang::driver::options::CC1Option, clang::driver::options::ClangOption, clang::driver::options::FlangOption, clang::DiagnosticIDs::getDiagnosticFlags(), getOpts(), clang::driver::options::Ignored, IsFlangMode(), clang::driver::options::Unsupported, and X.

Referenced by HandleImmediateArgs().

◆ HandleImmediateArgs()

◆ hasHeaderMode()

bool clang::driver::Driver::hasHeaderMode ( ) const
inline

Returns true if the user has indicated a C++20 header unit mode.

Definition at line 749 of file Driver.h.

References clang::driver::HeaderMode_None.

Referenced by BuildInputs().

◆ IsCLMode()

bool clang::driver::Driver::IsCLMode ( ) const
inline

◆ IsDXCMode()

bool clang::driver::Driver::IsDXCMode ( ) const
inline

Whether the driver should follow dxc.exe like behavior.

Definition at line 254 of file Driver.h.

Referenced by BuildCompilation(), BuildInputs(), and GetNamedOutputPath().

◆ IsFlangMode()

◆ isSaveTempsEnabled()

bool clang::driver::Driver::isSaveTempsEnabled ( ) const
inline

Definition at line 461 of file Driver.h.

Referenced by ExecuteCompilation(), and GetNamedOutputPath().

◆ isSaveTempsObj()

bool clang::driver::Driver::isSaveTempsObj ( ) const
inline

Definition at line 462 of file Driver.h.

Referenced by GetNamedOutputPath().

◆ isUsingLTO()

◆ isUsingOffloadLTO()

bool clang::driver::Driver::isUsingOffloadLTO ( ) const
inline

Returns true if we are performing any kind of offload LTO.

Definition at line 761 of file Driver.h.

References getOffloadLTOMode(), and clang::driver::LTOK_None.

Referenced by clang::driver::tools::OffloadPackager::ConstructJob(), and ConstructPhaseAction().

◆ maybeGenerateCompilationDiagnostics()

bool clang::driver::Driver::maybeGenerateCompilationDiagnostics ( CommandStatus CS,
ReproLevel Level,
Compilation & C,
const Command & FailingCommand,
StringRef AdditionalInformation = "",
CompilationDiagnosticReport * GeneratedReport = nullptr )
inline

Definition at line 603 of file Driver.h.

References clang::C, Crash, and generateCompilationDiagnostics().

◆ offloadDeviceOnly()

bool clang::driver::Driver::offloadDeviceOnly ( ) const
inline

Definition at line 469 of file Driver.h.

Referenced by BuildOffloadingActions(), and ConstructPhaseAction().

◆ offloadHostOnly()

bool clang::driver::Driver::offloadHostOnly ( ) const
inline

Definition at line 468 of file Driver.h.

Referenced by BuildOffloadingActions().

◆ ParseArgStrings()

InputArgList Driver::ParseArgStrings ( ArrayRef< const char * > Args,
bool UseDriverMode,
bool & ContainsError ) const

ParseArgStrings - Parse the given list of strings into an ArgList.

Definition at line 267 of file Driver.cpp.

References clang::driver::options::CC1Option, Diag(), getOpts(), IsCLMode(), clang::driver::options::Unsupported, and clang::DiagnosticsEngine::Warning.

Referenced by BuildCompilation().

◆ PrintActions()

void Driver::PrintActions ( const Compilation & C) const

PrintActions - Print the list of actions.

Definition at line 2741 of file Driver.cpp.

References clang::C, and PrintActions1().

Referenced by BuildCompilation().

◆ PrintHelp()

void Driver::PrintHelp ( bool ShowHidden) const

PrintHelp - Print the help text.

Parameters
ShowHidden- Show hidden options.

Definition at line 2293 of file Driver.cpp.

References DriverTitle, getOpts(), and Name.

Referenced by HandleImmediateArgs().

◆ PrintVersion()

◆ setCheckInputsExist()

void clang::driver::Driver::setCheckInputsExist ( bool Value)
inline

Definition at line 436 of file Driver.h.

Referenced by clang::createInvocation().

◆ setFlangF128MathLibrary()

void clang::driver::Driver::setFlangF128MathLibrary ( std::string name)
inline

Definition at line 471 of file Driver.h.

References FlangF128MathLibrary.

◆ setPreferredLinker()

void clang::driver::Driver::setPreferredLinker ( std::string Value)
inline

Definition at line 457 of file Driver.h.

◆ setPrependArg()

void clang::driver::Driver::setPrependArg ( const char * Value)
inline

Definition at line 442 of file Driver.h.

◆ setProbePrecompiled()

void clang::driver::Driver::setProbePrecompiled ( bool Value)
inline

Definition at line 439 of file Driver.h.

Referenced by clang::createInvocation().

◆ setTargetAndMode()

void clang::driver::Driver::setTargetAndMode ( const ParsedClangName & TM)
inline

Definition at line 444 of file Driver.h.

References ClangNameParts.

◆ setTitle()

void clang::driver::Driver::setTitle ( std::string Value)
inline

Definition at line 447 of file Driver.h.

References DriverTitle.

Referenced by newDriver().

◆ ShouldEmitStaticLibrary()

bool Driver::ShouldEmitStaticLibrary ( const llvm::opt::ArgList & Args) const

ShouldEmitStaticLibrary - Should the linker emit a static library.

Definition at line 7014 of file Driver.cpp.

◆ ShouldUseClangCompiler()

bool Driver::ShouldUseClangCompiler ( const JobAction & JA) const

ShouldUseClangCompiler - Should the clang compiler be used to handle this action.

Definition at line 6985 of file Driver.cpp.

References clang::driver::Action::input_begin(), clang::isa(), clang::driver::types::isAcceptedByClang(), and clang::driver::Action::size().

◆ ShouldUseFlangCompiler()

bool Driver::ShouldUseFlangCompiler ( const JobAction & JA) const

ShouldUseFlangCompiler - Should the flang compiler be used to handle this action.

Definition at line 7000 of file Driver.cpp.

References clang::driver::Action::input_begin(), clang::isa(), clang::driver::types::isAcceptedByFlang(), and clang::driver::Action::size().

Member Data Documentation

◆ CC1Main

CC1ToolFunc clang::driver::Driver::CC1Main = nullptr

◆ CCCPrintBindings

unsigned clang::driver::Driver::CCCPrintBindings

Only print tool bindings, don't build any jobs.

Definition at line 258 of file Driver.h.

Referenced by BuildCompilation(), and Driver().

◆ CCGenDiagnostics

unsigned clang::driver::Driver::CCGenDiagnostics

◆ CCLogDiagnostics

unsigned clang::driver::Driver::CCLogDiagnostics

Set CC_LOG_DIAGNOSTICS mode, which causes the frontend to log diagnostics to CCLogDiagnosticsFilename or to stderr, in a stable machine readable format.

Definition at line 285 of file Driver.h.

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

◆ CCLogDiagnosticsFilename

std::string clang::driver::Driver::CCLogDiagnosticsFilename

The file to log CC_LOG_DIAGNOSTICS output to, if enabled.

Definition at line 229 of file Driver.h.

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

◆ CCPrintHeadersFilename

std::string clang::driver::Driver::CCPrintHeadersFilename

The file to log CC_PRINT_HEADERS output to, if enabled.

Definition at line 226 of file Driver.h.

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

◆ CCPrintHeadersFiltering

HeaderIncludeFilteringKind clang::driver::Driver::CCPrintHeadersFiltering = HIFIL_None

This flag determines whether clang should filter the header information that is emitted.

If enviroment variable CC_PRINT_HEADERS_FILTERING is set to "only-direct-system", only system headers that are directly included from non-system headers are emitted.

Definition at line 274 of file Driver.h.

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

◆ CCPrintHeadersFormat

HeaderIncludeFormatKind clang::driver::Driver::CCPrintHeadersFormat = HIFMT_None

The format of the header information that is emitted.

If CC_PRINT_HEADERS is set, the format is textual. Otherwise, the format is determined by the enviroment variable CC_PRINT_HEADERS_FORMAT.

Definition at line 268 of file Driver.h.

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

◆ CCPrintInternalStatReportFilename

std::string clang::driver::Driver::CCPrintInternalStatReportFilename

The file to log CC_PRINT_INTERNAL_STAT_FILE output to, if enabled.

Definition at line 220 of file Driver.h.

Referenced by clang::driver::tools::getStatsFileName().

◆ CCPrintInternalStats

unsigned clang::driver::Driver::CCPrintInternalStats

Set CC_PRINT_INTERNAL_STAT mode, which causes the driver to dump internal performance report to CC_PRINT_INTERNAL_STAT_FILE or to stdout.

Definition at line 299 of file Driver.h.

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

◆ CCPrintOptions

unsigned clang::driver::Driver::CCPrintOptions

Set CC_PRINT_OPTIONS mode, which is like -v but logs the commands to CCPrintOptionsFilename or to stderr.

Definition at line 263 of file Driver.h.

Referenced by Driver().

◆ CCPrintOptionsFilename

std::string clang::driver::Driver::CCPrintOptionsFilename

The file to log CC_PRINT_OPTIONS output to, if enabled.

Definition at line 223 of file Driver.h.

◆ CCPrintProcessStats

unsigned clang::driver::Driver::CCPrintProcessStats

Set CC_PRINT_PROC_STAT mode, which causes the driver to dump performance report to CC_PRINT_PROC_STAT_FILE or to stdout.

Definition at line 294 of file Driver.h.

Referenced by BuildCompilation(), BuildJobs(), and Driver().

◆ CCPrintStatReportFilename

std::string clang::driver::Driver::CCPrintStatReportFilename

The file to log CC_PRINT_PROC_STAT_FILE output to, if enabled.

Definition at line 217 of file Driver.h.

Referenced by BuildCompilation(), and BuildJobs().

◆ ClangExecutable

std::string clang::driver::Driver::ClangExecutable

The original path to the clang executable.

Definition at line 183 of file Driver.h.

Referenced by BuildCompilation(), clang::driver::tools::aix::Linker::ConstructJob(), Driver(), and getClangProgramPath().

◆ ClangNameParts

ParsedClangName clang::driver::Driver::ClangNameParts

Target and driver mode components extracted from clang executable name.

Definition at line 186 of file Driver.h.

Referenced by setTargetAndMode().

◆ Dir

◆ DriverTitle

std::string clang::driver::Driver::DriverTitle

Driver title to use with help.

Definition at line 211 of file Driver.h.

Referenced by Driver(), getTitle(), PrintHelp(), and setTitle().

◆ DyldPrefix

std::string clang::driver::Driver::DyldPrefix

◆ FlangF128MathLibrary

std::string clang::driver::Driver::FlangF128MathLibrary

Name of the library that provides implementations of IEEE-754 128-bit float math functions used by Fortran F128 runtime library.

It should be linked as needed by the linker job.

Definition at line 279 of file Driver.h.

Referenced by getFlangF128MathLibrary(), and setFlangF128MathLibrary().

◆ HostBits

std::string clang::driver::Driver::HostBits

Information about the host which can be overridden by the user.

Definition at line 214 of file Driver.h.

◆ HostMachine

std::string clang::driver::Driver::HostMachine

Definition at line 214 of file Driver.h.

◆ HostRelease

std::string clang::driver::Driver::HostRelease

Definition at line 214 of file Driver.h.

◆ HostSystem

std::string clang::driver::Driver::HostSystem

Definition at line 214 of file Driver.h.

◆ Name

std::string clang::driver::Driver::Name

The name the driver was invoked as.

Definition at line 176 of file Driver.h.

Referenced by BuildCompilation(), Driver(), generateCompilationDiagnostics(), GetFilePath(), GetNamedOutputPath(), GetProgramPath(), and PrintHelp().

◆ PrefixDirs

prefix_list clang::driver::Driver::PrefixDirs

◆ ResourceDir

◆ SysRoot

◆ SystemConfigDir

std::string clang::driver::Driver::SystemConfigDir

System directory for config files.

Definition at line 192 of file Driver.h.

Referenced by Driver(), and HandleImmediateArgs().

◆ UserConfigDir

std::string clang::driver::Driver::UserConfigDir

User directory for config files.

Definition at line 195 of file Driver.h.

Referenced by Driver(), and HandleImmediateArgs().


The documentation for this class was generated from the following files: