clang
10.0.0svn
|
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. More... | |
typedef SmallVector< std::pair< types::ID, const llvm::opt::Arg * >, 16 > | InputList |
A list of inputs and their types for the given arguments. More... | |
Public Member Functions | |
DiagnosticBuilder | Diag (unsigned DiagID) const |
bool | CCCIsCXX () const |
Whether the driver should follow g++ like behavior. More... | |
bool | CCCIsCPP () const |
Whether the driver is just the preprocessor. More... | |
bool | CCCIsCC () const |
Whether the driver should follow gcc like behavior. More... | |
bool | IsCLMode () const |
Whether the driver should follow cl.exe like behavior. More... | |
Driver (StringRef ClangExecutable, StringRef TargetTriple, DiagnosticsEngine &Diags, IntrusiveRefCntPtr< llvm::vfs::FileSystem > VFS=nullptr) | |
Accessors | |
const std::string & | getCCCGenericGCCName () const |
Name to use when invoking gcc/g++. More... | |
const std::string & | getConfigFile () const |
const llvm::opt::OptTable & | getOpts () const |
const DiagnosticsEngine & | getDiags () const |
llvm::vfs::FileSystem & | getVFS () const |
bool | getCheckInputsExist () const |
void | setCheckInputsExist (bool 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. More... | |
const char * | getInstalledDir () const |
Get the path to where the clang executable was installed. More... | |
void | setInstalledDir (StringRef Value) |
bool | isSaveTempsEnabled () const |
bool | isSaveTempsObj () const |
bool | embedBitcodeEnabled () const |
bool | embedBitcodeInObject () const |
bool | embedBitcodeMarkerOnly () const |
OpenMPRuntimeKind | getOpenMPRuntime (const llvm::opt::ArgList &Args) const |
Compute the desired OpenMP runtime from the flags provided. More... | |
Primary Functionality | |
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. More... | |
Compilation * | BuildCompilation (ArrayRef< const char *> Args) |
BuildCompilation - Construct a compilation object for a command line argument vector. More... | |
Driver Steps | |
void | ParseDriverMode (StringRef ProgramName, ArrayRef< const char *> Args) |
ParseDriverMode - Look for and handle the driver mode option in Args. More... | |
llvm::opt::InputArgList | ParseArgStrings (ArrayRef< const char *> Args, bool IsClCompatMode, bool &ContainsError) |
ParseArgStrings - Parse the given list of strings into an ArgList. More... | |
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. More... | |
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. More... | |
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. More... | |
bool | DiagnoseInputExistence (const llvm::opt::DerivedArgList &Args, StringRef Value, types::ID Ty, bool TypoCorrect) const |
Check that the file referenced by Value exists. More... | |
void | BuildJobs (Compilation &C) const |
BuildJobs - Bind actions to concrete tools and translate arguments to form the list of jobs to run. More... | |
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. More... | |
void | generateCompilationDiagnostics (Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation="", CompilationDiagnosticReport *GeneratedReport=nullptr) |
generateCompilationDiagnostics - Generate diagnostics information including preprocessed source file(s). More... | |
Static Public Member Functions | |
static std::string | GetResourcesPath (StringRef BinaryPath, StringRef CustomResourceDir="") |
Takes the path to a binary that's either in bin/ or lib/ and returns the path to clang's resource directory. More... | |
static bool | GetReleaseVersion (StringRef Str, unsigned &Major, unsigned &Minor, unsigned &Micro, bool &HadExtra) |
GetReleaseVersion - Parse (([0-9]+)(. More... | |
static bool | GetReleaseVersion (StringRef Str, MutableArrayRef< unsigned > Digits) |
Parse digits from a string Str and fulfill Digits with the parsed numbers. More... | |
static void | getDefaultModuleCachePath (SmallVectorImpl< char > &Result) |
Compute the default -fmodule-cache-path. More... | |
Public Attributes | |
std::string | Name |
The name the driver was invoked as. More... | |
std::string | Dir |
The path the driver executable was in, as invoked from the command line. More... | |
std::string | ClangExecutable |
The original path to the clang executable. More... | |
ParsedClangName | ClangNameParts |
Target and driver mode components extracted from clang executable name. More... | |
std::string | InstalledDir |
The path to the installed clang directory, if any. More... | |
std::string | ResourceDir |
The path to the compiler resource directory. More... | |
std::string | SystemConfigDir |
System directory for config files. More... | |
std::string | UserConfigDir |
User directory for config files. More... | |
prefix_list | PrefixDirs |
std::string | SysRoot |
sysroot, if present More... | |
std::string | DyldPrefix |
Dynamic loader prefix, if present. More... | |
std::string | DriverTitle |
Driver title to use with help. More... | |
std::string | HostBits |
Information about the host which can be overridden by the user. More... | |
std::string | HostMachine |
std::string | HostSystem |
std::string | HostRelease |
const char * | CCPrintOptionsFilename |
The file to log CC_PRINT_OPTIONS output to, if enabled. More... | |
const char * | CCPrintHeadersFilename |
The file to log CC_PRINT_HEADERS output to, if enabled. More... | |
const char * | CCLogDiagnosticsFilename |
The file to log CC_LOG_DIAGNOSTICS output to, if enabled. More... | |
unsigned | CCCPrintBindings: 1 |
Only print tool bindings, don't build any jobs. More... | |
unsigned | CCPrintOptions: 1 |
Set CC_PRINT_OPTIONS mode, which is like -v but logs the commands to CCPrintOptionsFilename or to stderr. More... | |
unsigned | CCPrintHeaders: 1 |
Set CC_PRINT_HEADERS mode, which causes the frontend to log header include information to CCPrintHeadersFilename or to stderr. More... | |
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. More... | |
unsigned | CCGenDiagnostics: 1 |
Whether the driver is generating diagnostics for debugging purposes. More... | |
unsigned | GenReproducer: 1 |
Force clang to emit reproducer for driver invocation. More... | |
Helper Methods | |
void | PrintActions (const Compilation &C) const |
PrintActions - Print the list of actions. More... | |
void | PrintHelp (bool ShowHidden) const |
PrintHelp - Print the help text. More... | |
void | PrintVersion (const Compilation &C, raw_ostream &OS) const |
PrintVersion - Print the driver version. More... | |
std::string | GetFilePath (StringRef Name, const ToolChain &TC) const |
GetFilePath - Lookup Name in the list of file search paths. More... | |
std::string | GetProgramPath (StringRef Name, const ToolChain &TC) const |
GetProgramPath - Lookup Name in the list of program search paths. More... | |
void | HandleAutocompletions (StringRef PassedFlags) const |
HandleAutocompletions - Handle –autocomplete by searching and printing possible flags, descriptions, and its arguments. More... | |
bool | HandleImmediateArgs (const Compilation &C) |
HandleImmediateArgs - Handle any arguments which should be treated before building actions or binding tools. More... | |
Action * | ConstructPhaseAction (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. More... | |
InputInfo | 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 >, InputInfo > &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 . More... | |
const char * | getDefaultImageName () const |
Returns the default name for linked images (e.g., "a.out"). More... | |
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 . More... | |
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. More... | |
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. More... | |
std::string | GetClPchPath (Compilation &C, StringRef BaseName) const |
Return the pathname of the pch file in clang-cl mode. More... | |
bool | ShouldUseClangCompiler (const JobAction &JA) const |
ShouldUseClangCompiler - Should the clang compiler be used to handle this action. More... | |
bool | isUsingLTO () const |
Returns true if we are performing any kind of LTO. More... | |
LTOKind | getLTOMode () const |
Get the specific kind of LTO being performed. More... | |
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like command line arguments.
typedef SmallVector<std::pair<types::ID, const llvm::opt::Arg *>, 16> clang::driver::Driver::InputList |
typedef SmallVector<std::string, 4> clang::driver::Driver::prefix_list |
Driver::Driver | ( | StringRef | ClangExecutable, |
StringRef | TargetTriple, | ||
DiagnosticsEngine & | Diags, | ||
IntrusiveRefCntPtr< llvm::vfs::FileSystem > | VFS = nullptr |
||
) |
Definition at line 120 of file Driver.cpp.
References Dir, GetResourcesPath(), InstalledDir, Name, ResourceDir, SystemConfigDir, and UserConfigDir.
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.
C | - The compilation that is being built. |
Args | - The input arguments. |
Actions | - The list to store the resulting actions onto. |
Definition at line 3332 of file Driver.cpp.
References Diag(), clang::driver::types::getCompilationPhases(), and V.
Referenced by BuildUniversalActions(), and generateCompilationDiagnostics().
Compilation * Driver::BuildCompilation | ( | ArrayRef< const char *> | Args | ) |
BuildCompilation - Construct a compilation object for a command line argument vector.
Definition at line 934 of file Driver.cpp.
References ClangExecutable, IsCLMode(), ParseArgStrings(), ParseDriverMode(), PrefixDirs, and Split.
Referenced by clang::createInvocationFromCommandLine().
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.
TC | - The default host tool chain. |
Args | - The input arguments. |
Inputs | - The list to store the resulting compilation inputs onto. |
Definition at line 2060 of file Driver.cpp.
References clang::driver::OffloadAction::DeviceDependences::add(), clang::driver::phases::Assemble, clang::driver::phases::Backend, CCCIsCPP(), CCCIsCXX(), clang::driver::phases::Compile, ConstructPhaseAction(), clang::CudaArchToString(), Diag(), DiagnoseInputExistence(), clang::frontend::EmitLLVM, clang::driver::OffloadAction::DeviceDependences::getActions(), clang::driver::types::getCompilationPhases(), clang::driver::Compilation::getDriver(), clang::driver::Action::getInputs(), clang::driver::Action::getKind(), clang::driver::Compilation::getOffloadToolChains(), getOpts(), clang::driver::phases::getPhaseName(), clang::driver::types::getPreprocessedType(), clang::driver::Compilation::getSingleOffloadToolChain(), clang::driver::ToolChain::getTriple(), clang::driver::Action::getType(), clang::driver::types::getTypeName(), clang::GFX803, clang::driver::Compilation::hasOffloadToolChain(), clang::initialize(), IsCLMode(), clang::driver::types::isSrcFile(), clang::driver::phases::Link, clang::driver::options::LinkerInput, clang::driver::types::lookupCXXTypeForCType(), clang::driver::types::lookupHeaderTypeForSourceType(), clang::driver::types::lookupTypeForExtension(), clang::driver::ToolChain::LookupTypeForExtension(), clang::driver::types::lookupTypeForTypeSpecifier(), clang::driver::LTOK_None, clang::driver::Compilation::MakeAction(), MakeInputArg(), clang::driver::Action::OFK_Cuda, clang::driver::Action::OFK_HIP, clang::driver::Action::OFK_Host, clang::driver::Action::OFK_None, clang::driver::Action::OFK_OpenMP, clang::driver::phases::Preprocess, Previous, clang::driver::Action::propagateHostOffloadInfo(), clang::driver::OffloadUnbundlingJobAction::registerDependentActionInfo(), clang::driver::Action::setCannotBeCollapsedWithNextDependentAction(), clang::SM_20, clang::StringToCudaArch(), clang::driver::types::TY_INVALID, and clang::UNKNOWN.
Referenced by generateCompilationDiagnostics().
void Driver::BuildJobs | ( | Compilation & | C | ) | const |
BuildJobs - Bind actions to concrete tools and translate arguments to form the list of jobs to run.
C | - The compilation that is being built. |
Definition at line 3617 of file Driver.cpp.
References BuildJobsForAction(), clang::driver::Tool::canEmitIR(), Diag(), clang::EmbedBitcode(), clang::driver::Compilation::getActions(), clang::driver::Compilation::getArgs(), getDefaultImageName(), clang::driver::Compilation::getDefaultToolChain(), clang::driver::Action::getInputs(), clang::driver::Action::getOffloadingDeviceKind(), clang::driver::ToolChain::getTriple(), clang::driver::Action::getType(), clang::driver::Tool::hasIntegratedAssembler(), clang::driver::Tool::hasIntegratedCPP(), IsCLMode(), clang::driver::Action::isCollapsingWithNextDependentActionLegal(), clang::driver::options::NoArgumentUnused, clang::driver::Action::OFK_None, and clang::driver::ToolChain::SelectTool().
Referenced by generateCompilationDiagnostics().
InputInfo 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 >, InputInfo > & | 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 4027 of file Driver.cpp.
References CCCPrintBindings, CCGenDiagnostics, clang::driver::ToolChain::ComputeEffectiveClangTriple(), computeTargetTriple(), clang::driver::Tool::ConstructJob(), clang::driver::Tool::ConstructJobMultipleOutputs(), embedBitcodeInObject(), clang::driver::ToolChain::getArchName(), clang::driver::Compilation::getArgs(), clang::driver::Compilation::getArgsForToolChain(), clang::driver::InputInfo::getAsString(), getDefaultImageName(), clang::driver::Compilation::getDefaultToolChain(), clang::driver::Action::getInputs(), clang::driver::Tool::getName(), GetNamedOutputPath(), clang::driver::Action::getOffloadingDeviceKind(), clang::driver::Action::GetOffloadingFileNamePrefix(), clang::driver::Action::getOffloadingHostActiveKinds(), clang::driver::Tool::getToolChain(), clang::driver::ToolChain::getTriple(), GetTriplePlusArchString(), clang::driver::ToolChain::getTripleString(), clang::driver::Action::getType(), isSaveTempsEnabled(), isUsingLTO(), Name, clang::driver::Action::OFK_HIP, clang::driver::Action::OFK_Host, and clang::driver::Action::OFK_None.
Referenced by BuildJobs().
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.
C | - The compilation that is being built. |
TC | - The default host tool chain. |
Definition at line 1924 of file Driver.cpp.
References BuildActions(), clang::driver::types::canLipoType(), ContainsCompileOrAssembleAction(), Diag(), clang::driver::Compilation::getActions(), clang::driver::tools::darwin::getArchTypeForMachOArchName(), clang::driver::Compilation::getArgs(), clang::driver::ToolChain::getDefaultUniversalArchName(), clang::driver::types::getTypeName(), and clang::driver::Compilation::MakeAction().
Referenced by generateCompilationDiagnostics().
|
inline |
|
inline |
Whether the driver is just the preprocessor.
Definition at line 175 of file Driver.h.
Referenced by BuildInputs(), CheckPreprocessingOptions(), clang::driver::types::getCompilationPhases(), and ParseArgStrings().
|
inline |
Whether the driver should follow g++ like behavior.
Definition at line 172 of file Driver.h.
Referenced by BuildInputs(), ConstructGoldLinkJob(), clang::driver::tools::fuchsia::Linker::ConstructJob(), clang::driver::tools::nacltools::Linker::ConstructJob(), clang::driver::tools::dragonfly::Linker::ConstructJob(), clang::driver::tools::minix::Linker::ConstructJob(), clang::driver::tools::netbsd::Linker::ConstructJob(), clang::driver::tools::openbsd::Linker::ConstructJob(), clang::driver::tools::freebsd::Linker::ConstructJob(), clang::driver::tools::Myriad::Linker::ConstructJob(), clang::driver::tools::gnutools::Linker::ConstructJob(), clang::driver::tools::gcc::Common::ConstructJob(), clang::driver::toolchains::Fuchsia::Fuchsia(), getLibGccType(), clang::driver::ToolChain::ShouldLinkCXXStdlib(), and clang::driver::ToolChain::ToolChain().
Action * Driver::ConstructPhaseAction | ( | 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.
Definition at line 3513 of file Driver.cpp.
References clang::driver::phases::Assemble, clang::driver::phases::Backend, CCGenDiagnostics, clang::driver::phases::Compile, clang::driver::types::getPrecompiledType(), clang::driver::types::getPreprocessedType(), clang::driver::Action::getType(), clang::driver::phases::IfsMerge, isUsingLTO(), clang::driver::phases::Link, clang::driver::Compilation::MakeAction(), clang::driver::Action::OFK_None, clang::driver::phases::Precompile, clang::driver::phases::Preprocess, and clang::driver::types::TY_INVALID.
Referenced by BuildInputs().
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 597 of file Driver.cpp.
References clang::driver::Compilation::addOffloadDeviceToolChain(), Diag(), clang::driver::Compilation::getInputArgs(), getOpenMPRuntime(), clang::driver::Compilation::getSingleOffloadToolChain(), clang::driver::ToolChain::getTriple(), clang::driver::types::isCuda(), clang::driver::types::isHIP(), clang::driver::Action::OFK_Cuda, clang::driver::Action::OFK_HIP, clang::driver::Action::OFK_Host, clang::driver::Action::OFK_OpenMP, OMPRT_IOMP5, and OMPRT_OMP.
|
inline |
Definition at line 108 of file Driver.h.
References clang::DiagnosticsEngine::Report().
Referenced by clang::driver::SanitizerArgs::addArgs(), clang::driver::toolchains::DarwinClang::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::CudaToolChain::addClangTargetOptions(), addDebugPrefixMapArg(), addDefaultBlacklists(), AddLibgcc(), clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), addPGOAndCoverageFlags(), clang::driver::toolchains::Darwin::addStartObjectFileArgs(), clang::driver::tools::ClangAs::AddX86TargetArgs(), clang::driver::toolchains::AVRToolChain::AVRToolChain(), BuildActions(), clang::driver::toolchains::MSVCToolChain::buildAssembler(), BuildInputs(), BuildJobs(), BuildUniversalActions(), checkARMArchName(), checkARMCPUName(), CheckCodeGenerationOptions(), checkDebugInfoOption(), clang::driver::toolchains::Darwin::CheckObjCARC(), CheckPreprocessingOptions(), clang::driver::Compilation::CleanupFile(), CollectArgsForIntegratedAssembler(), clang::driver::ToolChain::ComputeLLVMTriple(), clang::driver::ToolChain::computeMSVCVersion(), computeTargetTriple(), clang::driver::tools::hexagon::Assembler::ConstructJob(), clang::driver::tools::visualstudio::Linker::ConstructJob(), clang::driver::tools::nacltools::Linker::ConstructJob(), clang::driver::tools::PS4cpu::Link::ConstructJob(), clang::driver::tools::gnutools::Linker::ConstructJob(), clang::driver::tools::gcc::Common::ConstructJob(), clang::driver::tools::Clang::ConstructJob(), clang::driver::tools::NVPTX::OpenMPLinker::ConstructJob(), CreateOffloadingDeviceToolChains(), DecodeAArch64Features(), DiagnoseInputExistence(), clang::driver::FallbackCommand::Execute(), clang::driver::Compilation::ExecuteCommand(), ExecuteCompilation(), generateCompilationDiagnostics(), getAArch64MicroArchFeaturesFromMcpu(), clang::driver::tools::amdgpu::getAMDGPUTargetFeatures(), getArchFeatures(), getARMFPUFeatures(), getARMHWDivFeatures(), clang::driver::toolchains::MipsLLVMToolChain::GetCXXStdlibType(), clang::driver::toolchains::NaClToolChain::GetCXXStdlibType(), clang::driver::toolchains::Fuchsia::GetCXXStdlibType(), clang::driver::toolchains::HexagonToolChain::GetCXXStdlibType(), clang::driver::ToolChain::GetCXXStdlibType(), getDebugFissionKind(), getExtensionFeatures(), getExtensionVersion(), clang::driver::tools::mips::getGnuCompatibleMipsABIName(), getHWMultLib(), clang::driver::tools::wasm::Linker::getLinkerPath(), clang::driver::ToolChain::GetLinkerPath(), GetNamedOutputPath(), getOpenMPRuntime(), clang::driver::toolchains::Fuchsia::GetRuntimeLibType(), clang::driver::toolchains::DarwinClang::GetRuntimeLibType(), clang::driver::ToolChain::GetRuntimeLibType(), getStaticPIE(), clang::driver::tools::getStatsFileName(), GetTemporaryDirectory(), GetTemporaryPath(), clang::driver::ToolChain::GetUnwindLibType(), getWebAssemblyTargetCPU(), handleHVXTargetFeatures(), handleHVXWarnings(), clang::driver::tools::isUseSeparateSections(), clang::driver::toolchains::MyriadToolChain::MyriadToolChain(), ParseAArch64BranchProtection(), ParseArgStrings(), parseArgValues(), parseClangCLEHFlags(), parseCoverageFeatures(), ParseDriverMode(), ParseMPreferVectorWidth(), ParseMRecip(), clang::driver::toolchains::PS4CPU::PS4CPU(), RelocationModelName(), RenderARCMigrateToolOptions(), RenderDebugInfoCompressionArgs(), RenderDiagnosticsOptions(), clang::driver::tools::gcc::Compiler::RenderExtraToolArgs(), RenderFloatingPointOptions(), RenderModulesOptions(), RenderObjCOptions(), RenderTrivialAutoVarInitOptions(), clang::driver::SanitizerArgs::SanitizerArgs(), searchForFile(), shouldLinkerNotDedup(), clang::driver::toolchains::Darwin::TranslateArgs(), clang::driver::tools::arm::useAAPCSForMachO(), clang::driver::XRayArgs::XRayArgs(), and clang::driver::tools::Clang::~Clang().
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 2011 of file Driver.cpp.
References Diag(), getCheckInputsExist(), getOpts(), getVFS(), and IsCLMode().
Referenced by BuildInputs().
|
inline |
Definition at line 338 of file Driver.h.
Referenced by shouldLinkerNotDedup().
|
inline |
Definition at line 339 of file Driver.h.
References clang::EmbedBitcode().
Referenced by BuildJobsForAction(), and clang::driver::tools::Clang::ConstructJob().
|
inline |
Definition at line 340 of file Driver.h.
Referenced by clang::driver::tools::Clang::ConstructJob(), and shouldLinkerNotDedup().
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 1447 of file Driver.cpp.
References clang::driver::Compilation::CleanupFileMap(), Diag(), clang::driver::Compilation::ExecuteJobs(), clang::driver::Compilation::getArgs(), clang::driver::Command::getCreator(), clang::driver::Compilation::getFailureResultFiles(), clang::driver::Compilation::getJobs(), clang::driver::Compilation::getResultFiles(), clang::driver::Tool::getShortName(), clang::driver::Command::getSource(), clang::driver::Tool::hasGoodDiagnostics(), isSaveTempsEnabled(), and clang::driver::JobList::Print().
void Driver::generateCompilationDiagnostics | ( | Compilation & | C, |
const Command & | FailingCommand, | ||
StringRef | AdditionalInformation = "" , |
||
CompilationDiagnosticReport * | GeneratedReport = nullptr |
||
) |
generateCompilationDiagnostics - Generate diagnostics information including preprocessed source file(s).
Definition at line 1243 of file Driver.cpp.
References clang::driver::Compilation::addTempFile(), BuildActions(), BuildInputs(), BuildJobs(), BuildUniversalActions(), CCGenDiagnostics, Cmd, Diag(), clang::driver::Compilation::ExecuteJobs(), clang::driver::CrashReportInfo::Filename, clang::driver::Compilation::getActions(), clang::driver::Compilation::getArgs(), clang::driver::Command::getArguments(), clang::getClangFullVersion(), clang::driver::Command::getCreator(), clang::driver::Compilation::getDefaultToolChain(), clang::driver::Command::getExecutable(), clang::driver::Compilation::getInputArgs(), clang::driver::Compilation::getJobs(), clang::driver::types::getPreprocessedType(), clang::driver::Tool::getResponseFilesSupport(), clang::driver::Compilation::getTempFiles(), GetTemporaryPath(), clang::driver::ToolChain::getTriple(), clang::DiagnosticErrorTrap::hasErrorOccurred(), clang::driver::Compilation::initCompilationForDiagnostics(), clang::driver::Tool::isDsymutilJob(), clang::driver::Tool::isLinkJob(), Name, clang::driver::Command::Print(), printArgList(), PrintVersion(), clang::driver::Tool::RF_None, clang::driver::Command::setResponseFile(), clang::driver::Driver::CompilationDiagnosticReport::TemporaryFiles, and clang::driver::types::TY_INVALID.
|
inline |
Name to use when invoking gcc/g++.
Definition at line 299 of file Driver.h.
Referenced by clang::driver::tools::gcc::Common::ConstructJob().
|
inline |
Definition at line 309 of file Driver.h.
Referenced by DiagnoseInputExistence().
|
inline |
Get the path to the main clang executable.
Definition at line 321 of file Driver.h.
Referenced by clang::driver::tools::Clang::ConstructJob(), and clang::driver::tools::ClangAs::ConstructJob().
std::string Driver::GetClPchPath | ( | Compilation & | C, |
StringRef | BaseName | ||
) | const |
Return the pathname of the pch file in clang-cl mode.
Definition at line 4674 of file Driver.cpp.
References clang::driver::Compilation::getArgs(), clang::driver::toolchains::BareMetal::handlesTarget(), and clang::Target.
Referenced by GetNamedOutputPath(), and RelocationModelName().
|
inline |
const char * Driver::getDefaultImageName | ( | ) | const |
Returns the default name for linked images (e.g., "a.out").
Definition at line 4321 of file Driver.cpp.
References normalize(), and clang::Target.
Referenced by BuildJobs(), BuildJobsForAction(), and GetNamedOutputPath().
|
static |
Compute the default -fmodule-cache-path.
Definition at line 2691 of file Clang.cpp.
References appendUserToPath().
Referenced by RenderModulesOptions().
|
inline |
Definition at line 305 of file Driver.h.
Referenced by RenderDiagnosticsOptions().
std::string Driver::GetFilePath | ( | StringRef | Name, |
const ToolChain & | TC | ||
) | const |
GetFilePath - Lookup Name
in the list of file search paths.
TC | - The tool chain for additional information on directories to search. |
Definition at line 4550 of file Driver.cpp.
References Dir, clang::driver::ToolChain::getCompilerRTPath(), clang::driver::ToolChain::getFilePaths(), clang::driver::ToolChain::getLibraryPaths(), Name, P, PrefixDirs, ResourceDir, and SysRoot.
Referenced by HandleImmediateArgs().
|
inline |
Get the path to where the clang executable was installed.
Definition at line 326 of file Driver.h.
Referenced by clang::driver::toolchains::HexagonToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::Linux::computeSysRoot(), clang::driver::toolchains::HexagonToolChain::getHexagonLibraryPaths(), and clang::driver::toolchains::HexagonToolChain::HexagonToolChain().
|
inline |
Get the specific kind of LTO being performed.
Definition at line 541 of file Driver.h.
References clang::driver::isOptimizationLevelFast(), and clang::Target.
Referenced by clang::driver::tools::fuchsia::Linker::ConstructJob(), clang::driver::tools::cloudabi::Linker::ConstructJob(), clang::driver::tools::freebsd::Linker::ConstructJob(), clang::driver::tools::ananas::Linker::ConstructJob(), clang::driver::tools::RISCV::Linker::ConstructJob(), clang::driver::tools::gnutools::Linker::ConstructJob(), clang::driver::tools::Clang::ConstructJob(), and shouldLinkerNotDedup().
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.
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 4359 of file Driver.cpp.
References clang::driver::Compilation::addResultFile(), clang::driver::Compilation::addTempFile(), clang::driver::types::appendSuffixForType(), CCGenDiagnostics, Diag(), End, clang::driver::Compilation::getArgs(), GetClPchPath(), getDefaultImageName(), clang::driver::Action::getOffloadingDeviceKind(), GetTemporaryPath(), clang::driver::Action::getType(), clang::driver::types::getTypeTempSuffix(), getVFS(), IsCLMode(), isSaveTempsEnabled(), isSaveTempsObj(), MakeCLOutputFilename(), Name, clang::driver::Action::OFK_HIP, and Split.
Referenced by BuildJobsForAction().
Driver::OpenMPRuntimeKind Driver::getOpenMPRuntime | ( | const llvm::opt::ArgList & | Args | ) | const |
Compute the desired OpenMP runtime from the flags provided.
Definition at line 572 of file Driver.cpp.
References Diag(), OMPRT_GOMP, OMPRT_IOMP5, OMPRT_OMP, and OMPRT_Unknown.
Referenced by clang::driver::tools::MinGW::Linker::ConstructJob(), clang::driver::tools::Clang::ConstructJob(), CreateOffloadingDeviceToolChains(), and clang::driver::tools::isUseSeparateSections().
|
inline |
Definition at line 303 of file Driver.h.
References clang::driver::getDriverOptTable().
Referenced by BuildInputs(), DiagnoseInputExistence(), getStaticPIE(), HandleAutocompletions(), MakeInputArg(), ParseArgStrings(), ParseDriverMode(), PrintHelp(), clang::driver::toolchains::AMDGPUToolChain::TranslateArgs(), clang::driver::toolchains::MSVCToolChain::TranslateArgs(), clang::driver::toolchains::HIPToolChain::TranslateArgs(), clang::driver::toolchains::CudaToolChain::TranslateArgs(), clang::driver::toolchains::MachO::TranslateArgs(), clang::driver::toolchains::Generic_GCC::TranslateArgs(), clang::driver::toolchains::Darwin::TranslateArgs(), and clang::driver::ToolChain::TranslateOpenMPTargetArgs().
std::string Driver::GetProgramPath | ( | StringRef | Name, |
const ToolChain & | TC | ||
) | const |
GetProgramPath - Lookup Name
in the list of program search paths.
TC | - The provided tool chain for additional information on directories to search. |
Definition at line 4618 of file Driver.cpp.
References P, PrefixDirs, and ScanDirForExecutable().
Referenced by HandleImmediateArgs().
|
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.
([0-9]+)(.([0-9]+)?))?)? and return the grouped values as integers. Numbers which are not provided are set to 0.
Definition at line 4880 of file Driver.cpp.
Referenced by getSystemOrSDKMacOSVersion(), and shouldLinkerNotDedup().
|
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().
Definition at line 4918 of file Driver.cpp.
References clang::driver::options::CLOption, clang::driver::options::CoreOption, clang::driver::isOptimizationLevelFast(), and clang::driver::options::NoDriverOption.
|
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 94 of file Driver.cpp.
References P.
Referenced by Driver().
|
inline |
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 4663 of file Driver.cpp.
References Diag().
Referenced by shouldLinkerNotDedup().
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 4652 of file Driver.cpp.
References Diag().
Referenced by generateCompilationDiagnostics(), GetNamedOutputPath(), and shouldLinkerNotDedup().
|
inline |
|
inline |
Definition at line 307 of file Driver.h.
Referenced by clang::driver::toolchains::Hurd::AddClangSystemIncludeArgs(), addPGOAndCoverageFlags(), clang::driver::tools::Clang::ConstructJob(), clang::driver::tools::ClangAs::ConstructJob(), clang::driver::CudaInstallationDetector::CudaInstallationDetector(), DiagnoseInputExistence(), findAndroidArmMultilibs(), findBiarchMultilibs(), findMipsImgMultilibs(), findMSP430Multilibs(), findRISCVMultilibs(), clang::driver::toolchains::FreeBSD::FreeBSD(), clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::getBiarchSibling(), clang::driver::toolchains::HexagonToolChain::getHexagonTargetDir(), getMultiarchTriple(), GetNamedOutputPath(), clang::driver::ToolChain::getVFS(), clang::driver::toolchains::HexagonToolChain::HexagonToolChain(), clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::init(), clang::driver::toolchains::Linux::Linux(), and ParseAArch64BranchProtection().
void Driver::HandleAutocompletions | ( | StringRef | PassedFlags | ) | const |
HandleAutocompletions - Handle –autocomplete by searching and printing possible flags, descriptions, and its arguments.
Definition at line 1567 of file Driver.cpp.
References getOpts(), clang::driver::options::Ignored, clang::driver::options::NoDriverOption, and clang::driver::options::Unsupported.
Referenced by HandleImmediateArgs().
bool Driver::HandleImmediateArgs | ( | const Compilation & | C | ) |
HandleImmediateArgs - Handle any arguments which should be treated before building actions or binding tools.
Definition at line 1648 of file Driver.cpp.
References clang::driver::ToolChain::ComputeEffectiveClangTriple(), clang::driver::Multilib::gccSuffix(), clang::driver::Compilation::getArgs(), clang::driver::ToolChain::getCompilerRT(), clang::driver::Compilation::getDefaultToolChain(), GetFilePath(), clang::driver::ToolChain::getFilePaths(), clang::driver::ToolChain::getMultilib(), clang::driver::ToolChain::getMultilibs(), GetProgramPath(), clang::driver::ToolChain::getProgramPaths(), clang::driver::ToolChain::GetRuntimeLibType(), clang::driver::Compilation::getSysRoot(), clang::driver::ToolChain::getTripleString(), HandleAutocompletions(), PrintDiagnosticCategories(), PrintHelp(), clang::driver::ToolChain::printVerboseInfo(), PrintVersion(), ResourceDir, clang::driver::ToolChain::RLT_CompilerRT, clang::driver::ToolChain::RLT_Libgcc, SystemConfigDir, and UserConfigDir.
|
inline |
Whether the driver should follow cl.exe like behavior.
Definition at line 181 of file Driver.h.
Referenced by BuildCompilation(), BuildInputs(), BuildJobs(), CheckPreprocessingOptions(), clang::driver::tools::visualstudio::Linker::ConstructJob(), clang::driver::tools::Clang::ConstructJob(), DiagnoseInputExistence(), clang::driver::Compilation::ExecuteJobs(), GetNamedOutputPath(), ParseArgStrings(), PrintHelp(), and searchForFile().
|
inline |
Definition at line 335 of file Driver.h.
Referenced by BuildJobsForAction(), clang::driver::tools::AMDGCN::Linker::ConstructJob(), clang::driver::tools::Clang::ConstructJob(), ExecuteCompilation(), GetNamedOutputPath(), clang::driver::Compilation::initCompilationForDiagnostics(), and clang::driver::Compilation::~Compilation().
|
inline |
Definition at line 336 of file Driver.h.
Referenced by GetNamedOutputPath().
|
inline |
Returns true if we are performing any kind of LTO.
Definition at line 538 of file Driver.h.
References clang::driver::LTOK_None.
Referenced by BuildJobsForAction(), clang::driver::tools::fuchsia::Linker::ConstructJob(), clang::driver::tools::cloudabi::Linker::ConstructJob(), clang::driver::tools::ananas::Linker::ConstructJob(), clang::driver::tools::freebsd::Linker::ConstructJob(), clang::driver::tools::RISCV::Linker::ConstructJob(), clang::driver::tools::gnutools::Linker::ConstructJob(), clang::driver::tools::Clang::ConstructJob(), ConstructPhaseAction(), clang::driver::SanitizerArgs::SanitizerArgs(), and shouldLinkerNotDedup().
InputArgList Driver::ParseArgStrings | ( | ArrayRef< const char *> | Args, |
bool | IsClCompatMode, | ||
bool & | ContainsError | ||
) |
ParseArgStrings - Parse the given list of strings into an ArgList.
Definition at line 186 of file Driver.cpp.
References clang::driver::phases::Assemble, clang::driver::phases::Backend, CCCIsCPP(), clang::driver::phases::Compile, Diag(), clang::DiagnosticsEngine::getDiagnosticLevel(), getOpts(), clang::driver::phases::IfsMerge, IsCLMode(), clang::driver::phases::Link, clang::driver::phases::Precompile, clang::driver::phases::Preprocess, clang::DiagnosticsEngine::Report(), clang::driver::options::Unsupported, and clang::DiagnosticsEngine::Warning.
Referenced by BuildCompilation(), and searchForFile().
void Driver::ParseDriverMode | ( | StringRef | ProgramName, |
ArrayRef< const char *> | Args | ||
) |
ParseDriverMode - Look for and handle the driver mode option in Args.
Definition at line 153 of file Driver.cpp.
References ClangNameParts, Diag(), clang::driver::ParsedClangName::DriverMode, getOpts(), clang::driver::ToolChain::getTargetAndModeFromProgramName(), and clang::driver::ParsedClangName::isEmpty().
Referenced by BuildCompilation().
void Driver::PrintActions | ( | const Compilation & | C | ) | const |
PrintActions - Print the list of actions.
Definition at line 1904 of file Driver.cpp.
References clang::driver::Compilation::getActions(), and PrintActions1().
void Driver::PrintHelp | ( | bool | ShowHidden | ) | const |
PrintHelp - Print the help text.
ShowHidden | - Show hidden options. |
Definition at line 1518 of file Driver.cpp.
References DriverTitle, getOpts(), IsCLMode(), Name, and clang::driver::options::NoDriverOption.
Referenced by HandleImmediateArgs().
void Driver::PrintVersion | ( | const Compilation & | C, |
raw_ostream & | OS | ||
) | const |
PrintVersion - Print the driver version.
Definition at line 1534 of file Driver.cpp.
References clang::driver::Compilation::getArgs(), clang::getClangFullVersion(), clang::driver::Compilation::getDefaultToolChain(), clang::driver::ToolChain::getThreadModel(), clang::driver::ToolChain::getTripleString(), InstalledDir, and clang::driver::ToolChain::isThreadModelSupported().
Referenced by generateCompilationDiagnostics(), and HandleImmediateArgs().
|
inline |
Definition at line 311 of file Driver.h.
Referenced by clang::createInvocationFromCommandLine().
|
inline |
|
inline |
|
inline |
Definition at line 316 of file Driver.h.
Referenced by newDriver().
ShouldUseClangCompiler - Should the clang compiler be used to handle this action.
Definition at line 4861 of file Driver.cpp.
References clang::driver::Action::input_begin(), clang::driver::types::isAcceptedByClang(), and clang::driver::Action::size().
unsigned clang::driver::Driver::CCCPrintBindings |
Only print tool bindings, don't build any jobs.
Definition at line 184 of file Driver.h.
Referenced by BuildJobsForAction().
unsigned clang::driver::Driver::CCGenDiagnostics |
Whether the driver is generating diagnostics for debugging purposes.
Definition at line 200 of file Driver.h.
Referenced by BuildJobsForAction(), clang::driver::tools::Clang::ConstructJob(), ConstructPhaseAction(), generateCompilationDiagnostics(), and GetNamedOutputPath().
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 197 of file Driver.h.
Referenced by clang::driver::tools::Clang::ConstructJob().
const char* clang::driver::Driver::CCLogDiagnosticsFilename |
The file to log CC_LOG_DIAGNOSTICS output to, if enabled.
Definition at line 165 of file Driver.h.
Referenced by clang::driver::tools::Clang::ConstructJob().
unsigned clang::driver::Driver::CCPrintHeaders |
Set CC_PRINT_HEADERS mode, which causes the frontend to log header include information to CCPrintHeadersFilename or to stderr.
Definition at line 192 of file Driver.h.
Referenced by clang::driver::tools::Clang::ConstructJob().
const char* clang::driver::Driver::CCPrintHeadersFilename |
The file to log CC_PRINT_HEADERS output to, if enabled.
Definition at line 162 of file Driver.h.
Referenced by clang::driver::tools::Clang::ConstructJob().
unsigned clang::driver::Driver::CCPrintOptions |
const char* clang::driver::Driver::CCPrintOptionsFilename |
std::string clang::driver::Driver::ClangExecutable |
The original path to the clang executable.
Definition at line 122 of file Driver.h.
Referenced by BuildCompilation(), and ParseAArch64BranchProtection().
ParsedClangName clang::driver::Driver::ClangNameParts |
Target and driver mode components extracted from clang executable name.
Definition at line 125 of file Driver.h.
Referenced by ParseDriverMode(), and searchForFile().
std::string clang::driver::Driver::Dir |
The path the driver executable was in, as invoked from the command line.
Definition at line 119 of file Driver.h.
Referenced by clang::driver::toolchains::NaClToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::NaClToolChain::addLibCxxIncludePaths(), clang::driver::toolchains::NetBSD::addLibCxxIncludePaths(), clang::driver::tools::AMDGCN::constructHIPFatbinCommand(), Driver(), clang::driver::toolchains::Fuchsia::Fuchsia(), GetFilePath(), clang::driver::tools::isUseSeparateSections(), clang::driver::toolchains::MyriadToolChain::MyriadToolChain(), clang::driver::toolchains::PS4CPU::PS4CPU(), searchForFile(), and shouldLinkerNotDedup().
std::string clang::driver::Driver::DriverTitle |
std::string clang::driver::Driver::DyldPrefix |
Dynamic loader prefix, if present.
Definition at line 150 of file Driver.h.
Referenced by clang::driver::tools::fuchsia::Linker::ConstructJob(), and clang::driver::tools::gnutools::Linker::ConstructJob().
unsigned clang::driver::Driver::GenReproducer |
std::string clang::driver::Driver::HostBits |
std::string clang::driver::Driver::InstalledDir |
The path to the installed clang directory, if any.
Definition at line 128 of file Driver.h.
Referenced by clang::driver::toolchains::HexagonToolChain::addLibStdCxxIncludePaths(), constructHexagonLinkArgs(), Driver(), clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::init(), and PrintVersion().
std::string clang::driver::Driver::Name |
The name the driver was invoked as.
Definition at line 115 of file Driver.h.
Referenced by BuildJobsForAction(), Driver(), generateCompilationDiagnostics(), GetFilePath(), GetNamedOutputPath(), printArgList(), PrintHelp(), and ScanDirForExecutable().
prefix_list clang::driver::Driver::PrefixDirs |
Definition at line 144 of file Driver.h.
Referenced by clang::driver::toolchains::HexagonToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::HexagonToolChain::addLibStdCxxIncludePaths(), BuildCompilation(), constructHexagonLinkArgs(), GetFilePath(), clang::driver::toolchains::HexagonToolChain::getHexagonLibraryPaths(), GetProgramPath(), clang::driver::toolchains::HexagonToolChain::HexagonToolChain(), and clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::init().
std::string clang::driver::Driver::ResourceDir |
The path to the compiler resource directory.
Definition at line 131 of file Driver.h.
Referenced by clang::driver::toolchains::PPCLinuxToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::Hurd::AddClangSystemIncludeArgs(), clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), clang::driver::toolchains::MipsLLVMToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::NaClToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::Solaris::AddClangSystemIncludeArgs(), clang::driver::toolchains::CrossWindowsToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::Fuchsia::AddClangSystemIncludeArgs(), clang::driver::toolchains::DarwinClang::AddClangSystemIncludeArgs(), addDefaultBlacklists(), clang::driver::tools::wasm::Linker::ConstructJob(), clang::driver::tools::Clang::ConstructJob(), Driver(), GetFilePath(), HandleImmediateArgs(), RelocationModelName(), and RenderModulesOptions().
std::string clang::driver::Driver::SysRoot |
sysroot, if present
Definition at line 147 of file Driver.h.
Referenced by clang::driver::toolchains::BareMetal::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::CrossWindowsToolChain::AddClangCXXStdlibIncludeArgs(), clang::driver::toolchains::Solaris::AddClangSystemIncludeArgs(), clang::driver::toolchains::CrossWindowsToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::MyriadToolChain::AddClangSystemIncludeArgs(), clang::driver::toolchains::Fuchsia::AddClangSystemIncludeArgs(), clang::driver::toolchains::NetBSD::addLibCxxIncludePaths(), clang::driver::toolchains::Linux::addLibStdCxxIncludePaths(), clang::driver::toolchains::RISCVToolChain::addLibStdCxxIncludePaths(), clang::driver::toolchains::Hurd::computeSysRoot(), clang::driver::toolchains::MipsLLVMToolChain::computeSysRoot(), clang::driver::toolchains::Linux::computeSysRoot(), ConstructGoldLinkJob(), clang::driver::tools::fuchsia::Linker::ConstructJob(), clang::driver::tools::wasm::Linker::ConstructJob(), clang::driver::tools::cloudabi::Linker::ConstructJob(), clang::driver::tools::nacltools::Linker::ConstructJob(), clang::driver::tools::dragonfly::Linker::ConstructJob(), clang::driver::tools::CrossWindows::Linker::ConstructJob(), clang::driver::tools::freebsd::Linker::ConstructJob(), clang::driver::tools::ananas::Linker::ConstructJob(), clang::driver::tools::netbsd::Linker::ConstructJob(), clang::driver::tools::MinGW::Linker::ConstructJob(), clang::driver::tools::RISCV::Linker::ConstructJob(), clang::driver::tools::msp430::Linker::ConstructJob(), clang::driver::tools::gnutools::Linker::ConstructJob(), ConstructPS4LinkJob(), clang::driver::CudaInstallationDetector::CudaInstallationDetector(), clang::driver::toolchains::Fuchsia::Fuchsia(), clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::getBiarchSibling(), GetFilePath(), clang::driver::Compilation::getSysRoot(), clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::init(), clang::driver::toolchains::MinGW::MinGW(), clang::driver::toolchains::MSP430ToolChain::MSP430ToolChain(), and ParseAArch64BranchProtection().
std::string clang::driver::Driver::SystemConfigDir |
System directory for config files.
Definition at line 134 of file Driver.h.
Referenced by Driver(), HandleImmediateArgs(), and searchForFile().
std::string clang::driver::Driver::UserConfigDir |
User directory for config files.
Definition at line 137 of file Driver.h.
Referenced by Driver(), HandleImmediateArgs(), and searchForFile().