clang API Documentation
#include <Driver.h>

Public Types | |
| typedef SmallVector < std::string, 4 > | prefix_list |
| typedef SmallVector< std::pair < types::ID, const Arg * >, 16 > | InputList |
| A list of inputs and their types for the given arguments. | |
Public Member Functions | |
| DiagnosticBuilder | Diag (unsigned DiagID) const |
| Driver (StringRef _ClangExecutable, StringRef _DefaultTargetTriple, StringRef _DefaultImageName, bool IsProduction, DiagnosticsEngine &_Diags) | |
| ~Driver () | |
Accessors | |
| const std::string & | getCCCGenericGCCName () const |
| Name to use when invoking gcc/g++. | |
| const OptTable & | getOpts () const |
| const DiagnosticsEngine & | getDiags () const |
| bool | getCheckInputsExist () const |
| void | setCheckInputsExist (bool Value) |
| const std::string & | getTitle () |
| void | setTitle (std::string Value) |
| const char * | getClangProgramPath () const |
| Get the path to the main clang executable. | |
| const char * | getInstalledDir () const |
| Get the path to where the clang executable was installed. | |
| void | setInstalledDir (StringRef Value) |
Primary Functionality | |
| Compilation * | BuildCompilation (ArrayRef< const char * > Args) |
Driver Steps | |
| InputArgList * | ParseArgStrings (ArrayRef< const char * > Args) |
| void | BuildInputs (const ToolChain &TC, const DerivedArgList &Args, InputList &Inputs) const |
| void | BuildActions (const ToolChain &TC, const DerivedArgList &Args, const InputList &Inputs, ActionList &Actions) const |
| void | BuildUniversalActions (const ToolChain &TC, const DerivedArgList &Args, const InputList &BAInputs, ActionList &Actions) const |
| void | BuildJobs (Compilation &C) const |
| int | ExecuteCompilation (const Compilation &C, const Command *&FailingCommand) const |
| void | generateCompilationDiagnostics (Compilation &C, const Command *FailingCommand) |
Static Public Member Functions | |
| static bool | GetReleaseVersion (const char *Str, unsigned &Major, unsigned &Minor, unsigned &Micro, bool &HadExtra) |
Public Attributes | |
| std::string | Name |
| The name the driver was invoked as. | |
| std::string | Dir |
| std::string | ClangExecutable |
| The original path to the clang executable. | |
| std::string | InstalledDir |
| The path to the installed clang directory, if any. | |
| std::string | ResourceDir |
| The path to the compiler resource directory. | |
| prefix_list | PrefixDirs |
| std::string | SysRoot |
| sysroot, if present | |
| bool | UseStdLib |
| If the standard library is used. | |
| std::string | DefaultTargetTriple |
| Default target triple. | |
| std::string | DefaultImageName |
| Default name for linked images (e.g., "a.out"). | |
| 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 |
| const char * | CCPrintOptionsFilename |
| The file to log CC_PRINT_OPTIONS output to, if enabled. | |
| const char * | CCPrintHeadersFilename |
| The file to log CC_PRINT_HEADERS output to, if enabled. | |
| const char * | CCLogDiagnosticsFilename |
| The file to log CC_LOG_DIAGNOSTICS output to, if enabled. | |
| unsigned | CCCIsCXX: 1 |
| Whether the driver should follow g++ like behavior. | |
| unsigned | CCCIsCPP: 1 |
| Whether the driver is just the preprocessor. | |
| unsigned | CCCEcho: 1 |
| Echo commands while executing (in -v style). | |
| unsigned | CCCPrintBindings: 1 |
| Only print tool bindings, don't build any jobs. | |
| unsigned | CCPrintOptions: 1 |
| unsigned | CCPrintHeaders: 1 |
| unsigned | CCLogDiagnostics: 1 |
| unsigned | CCGenDiagnostics: 1 |
| Whether the driver is generating diagnostics for debugging purposes. | |
| unsigned | CCCUsePCH: 1 |
| Use lazy precompiled headers for PCH support. | |
Helper Methods | |
| void | PrintActions (const Compilation &C) const |
| PrintActions - Print the list of actions. | |
| void | PrintHelp (bool ShowHidden) const |
| void | PrintOptions (const ArgList &Args) const |
| PrintOptions - Print the list of arguments. | |
| void | PrintVersion (const Compilation &C, raw_ostream &OS) const |
| PrintVersion - Print the driver version. | |
| std::string | GetFilePath (const char *Name, const ToolChain &TC) const |
| std::string | GetProgramPath (const char *Name, const ToolChain &TC, bool WantFile=false) const |
| bool | HandleImmediateArgs (const Compilation &C) |
| Action * | ConstructPhaseAction (const ArgList &Args, phases::ID Phase, Action *Input) const |
| void | BuildJobsForAction (Compilation &C, const Action *A, const ToolChain *TC, const char *BoundArch, bool AtTopLevel, const char *LinkingOutput, InputInfo &Result) const |
| const char * | GetNamedOutputPath (Compilation &C, const JobAction &JA, const char *BaseInput, bool AtTopLevel) const |
| std::string | GetTemporaryPath (StringRef Prefix, const char *Suffix) const |
| bool | ShouldUseClangCompiler (const Compilation &C, const JobAction &JA, const llvm::Triple &ArchName) const |
| bool | IsUsingLTO (const ArgList &Args) const |
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like command line arguments.
| typedef SmallVector<std::pair<types::ID, const Arg*>, 16> clang::driver::Driver::InputList |
| typedef SmallVector<std::string, 4> clang::driver::Driver::prefix_list |
| Driver::Driver | ( | StringRef | _ClangExecutable, |
| StringRef | _DefaultTargetTriple, | ||
| StringRef | _DefaultImageName, | ||
| bool | IsProduction, | ||
| DiagnosticsEngine & | _Diags | ||
| ) |
Definition at line 49 of file Driver.cpp.
References CLANG_RESOURCE_DIR, CLANG_VERSION_STRING, Dir, Name, P, and ResourceDir.
| Driver::~Driver | ( | ) |
Definition at line 91 of file Driver.cpp.
| void Driver::BuildActions | ( | const ToolChain & | TC, |
| const 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.
| TC | - The default host tool chain. |
| Args | - The input arguments. |
| Actions | - The list to store the resulting actions onto. |
Definition at line 1007 of file Driver.cpp.
References clang::driver::phases::Assemble, clang::driver::Arg::claim(), clang::driver::ArgList::ClaimAllArgs(), clang::driver::phases::Compile, ConstructPhaseAction(), Diag(), clang::driver::Arg::getAsString(), clang::driver::types::getCompilationPhase(), clang::driver::ArgList::getLastArg(), clang::driver::Option::getName(), clang::driver::types::getNumCompilationPhases(), clang::driver::Arg::getOption(), clang::driver::phases::getPhaseName(), clang::driver::types::getPreprocessedType(), clang::driver::ArgList::hasArg(), clang::driver::phases::Link, clang::driver::phases::Preprocess, and clang::driver::types::TY_INVALID.
Referenced by BuildCompilation(), BuildUniversalActions(), and generateCompilationDiagnostics().
| Compilation * Driver::BuildCompilation | ( | ArrayRef< const char * > | Args | ) |
BuildCompilation - Construct a compilation object for a command line argument vector.
Definition at line 242 of file Driver.cpp.
References BuildActions(), BuildInputs(), BuildJobs(), BuildUniversalActions(), CCCEcho, CCCIsCXX, CCCPrintBindings, CCCUsePCH, clang::driver::Arg::claim(), clang::driver::ArgList::ClaimAllArgs(), Diag(), Dir, clang::driver::ArgList::filtered_begin(), clang::driver::ArgList::filtered_end(), clang::driver::Compilation::getActions(), clang::driver::Compilation::getArgs(), clang::driver::Compilation::getDefaultToolChain(), clang::driver::Compilation::getInputArgs(), clang::driver::ArgList::getLastArg(), clang::driver::ToolChain::getTriple(), clang::driver::Arg::getValue(), HandleImmediateArgs(), clang::driver::ArgList::hasArg(), clang::driver::ArgList::hasFlag(), InstalledDir, ParseArgStrings(), PrefixDirs, PrintActions(), PrintOptions(), SysRoot, and UseStdLib.
Referenced by clang::createInvocationFromCommandLine().
| void Driver::BuildInputs | ( | const ToolChain & | TC, |
| const 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 886 of file Driver.cpp.
References clang::driver::ArgList::begin(), CCCIsCPP, CCCIsCXX, clang::driver::Arg::claim(), Diag(), clang::driver::ArgList::end(), clang::driver::DerivedArgList::getBaseArgs(), clang::driver::ArgList::getLastArg(), clang::driver::Arg::getOption(), clang::driver::types::getTypeName(), clang::driver::Arg::getValue(), clang::driver::ArgList::hasArg(), clang::driver::ArgList::hasArgNoClaim(), Index, clang::driver::Option::isLinkerInput(), clang::driver::types::lookupCXXTypeForCType(), clang::driver::ToolChain::LookupTypeForExtension(), clang::driver::types::lookupTypeForTypeSpecifier(), clang::driver::InputArgList::MakeIndex(), clang::driver::Option::matches(), clang::driver::OptTable::ParseOneArg(), and clang::driver::types::TY_INVALID.
Referenced by BuildCompilation(), and generateCompilationDiagnostics().
| void Driver::BuildJobs | ( | Compilation & | C | ) | const |
BuildJobs - Bind actions to concrete tools and translate arguments to form the list of jobs to run.
Definition at line 1160 of file Driver.cpp.
References clang::driver::ArgList::begin(), BuildJobsForAction(), DefaultImageName, Diag(), clang::driver::ArgList::end(), clang::driver::ArgList::filtered_begin(), clang::driver::ArgList::filtered_end(), clang::driver::Compilation::getActions(), clang::driver::Compilation::getArgs(), clang::driver::Arg::getAsString(), clang::driver::Compilation::getDefaultToolChain(), clang::driver::ArgList::getLastArg(), clang::driver::Arg::getOption(), clang::driver::Arg::getValue(), clang::driver::ArgList::hasArg(), clang::DiagnosticsEngine::hasErrorOccurred(), clang::driver::Option::hasNoArgumentUnused(), and clang::driver::Arg::isClaimed().
Referenced by BuildCompilation(), and generateCompilationDiagnostics().
| void Driver::BuildJobsForAction | ( | Compilation & | C, |
| const Action * | A, | ||
| const ToolChain * | TC, | ||
| const char * | BoundArch, | ||
| bool | AtTopLevel, | ||
| const char * | LinkingOutput, | ||
| InputInfo & | Result | ||
| ) | const |
BuildJobsForAction - Construct the jobs to perform for the action
Definition at line 1290 of file Driver.cpp.
References CCCPrintBindings, CCGenDiagnostics, clang::driver::Arg::claim(), clang::driver::ToolChain::getArchName(), clang::driver::Compilation::getArgs(), clang::driver::Compilation::getArgsForToolChain(), clang::driver::InputInfo::getAsString(), clang::driver::Compilation::getDefaultToolChain(), clang::driver::Action::getInputs(), GetNamedOutputPath(), clang::driver::Arg::getOption(), clang::driver::Action::getType(), clang::driver::Arg::getValue(), clang::driver::Option::matches(), Name, and SelectToolForJob().
Referenced by BuildJobs().
| void Driver::BuildUniversalActions | ( | const ToolChain & | TC, |
| const DerivedArgList & | Args, | ||
| const InputList & | BAInputs, | ||
| ActionList & | Actions | ||
| ) | const |
BuildUniversalActions - Construct the list of actions to perform for the given arguments, which may require a universal build.
| TC | - The default host tool chain. |
| Args | - The input arguments. |
| Actions | - The list to store the resulting actions onto. |
Definition at line 778 of file Driver.cpp.
References clang::driver::ArgList::begin(), BuildActions(), clang::driver::types::canLipoType(), clang::driver::Arg::claim(), ContainsCompileOrAssembleAction(), Diag(), clang::driver::ArgList::end(), clang::driver::Arg::getAsString(), clang::driver::ArgList::getLastArg(), clang::driver::Arg::getOption(), clang::driver::Action::getType(), clang::driver::types::getTypeName(), clang::driver::Arg::getValue(), clang::driver::ArgList::hasArg(), and clang::driver::Option::matches().
Referenced by BuildCompilation(), and generateCompilationDiagnostics().
| Action * Driver::ConstructPhaseAction | ( | const ArgList & | Args, |
| phases::ID | Phase, | ||
| Action * | Input | ||
| ) | const |
ConstructAction - Construct the appropriate action to do for
Definition at line 1103 of file Driver.cpp.
References clang::driver::phases::Assemble, clang::driver::phases::Compile, clang::driver::types::getPreprocessedType(), clang::driver::Action::getType(), clang::driver::ArgList::hasArg(), IsUsingLTO(), clang::driver::phases::Link, clang::driver::phases::Precompile, clang::driver::phases::Preprocess, and clang::driver::types::TY_INVALID.
Referenced by BuildActions().
| DiagnosticBuilder clang::driver::Driver::Diag | ( | unsigned | DiagID | ) | const [inline] |
Definition at line 54 of file Driver.h.
References clang::DiagnosticsEngine::Report().
Referenced by clang::driver::tools::darwin::CC1::AddCC1OptionsArgs(), AddLinkerInputs(), clang::driver::toolchains::DarwinClang::AddLinkRuntimeLibArgs(), BuildActions(), BuildCompilation(), BuildInputs(), BuildJobs(), BuildUniversalActions(), CheckCodeGenerationOptions(), CheckPreprocessingOptions(), clang::driver::Compilation::CleanupFileList(), clang::driver::ToolChain::ComputeEffectiveClangTriple(), clang::driver::tools::Clang::ConstructJob(), clang::driver::tools::gcc::Common::ConstructJob(), clang::driver::tools::hexagon::Assemble::ConstructJob(), clang::driver::tools::hexagon::Link::ConstructJob(), clang::driver::tools::darwin::Compile::ConstructJob(), clang::driver::toolchains::Darwin::Darwin(), clang::driver::Compilation::ExecuteCommand(), ExecuteCompilation(), generateCompilationDiagnostics(), clang::driver::ToolChain::GetCXXStdlibType(), clang::driver::ToolChain::GetRuntimeLibType(), GetTemporaryPath(), ParseArgStrings(), clang::driver::tools::gcc::Compile::RenderExtraToolArgs(), ShouldUseClangCompiler(), and clang::driver::toolchains::Darwin::TranslateArgs().
| int Driver::ExecuteCompilation | ( | const Compilation & | C, |
| const Command *& | FailingCommand | ||
| ) | const |
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, removing temporary files, etc.
Definition at line 489 of file Driver.cpp.
References clang::driver::Compilation::CleanupFileList(), Diag(), clang::driver::Compilation::ExecuteJob(), 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::Compilation::getTempFiles(), clang::driver::ArgList::hasArg(), clang::DiagnosticsEngine::hasErrorOccurred(), clang::driver::Tool::hasGoodDiagnostics(), and clang::driver::Compilation::PrintJob().
| void Driver::generateCompilationDiagnostics | ( | Compilation & | C, |
| const Command * | FailingCommand | ||
| ) |
generateCompilationDiagnostics - Generate diagnostics information including preprocessed source file(s).
Definition at line 367 of file Driver.cpp.
References clang::driver::ArgList::begin(), BUG_REPORT_URL, BuildActions(), BuildInputs(), BuildJobs(), BuildUniversalActions(), CCCIsCPP, CCGenDiagnostics, clang::driver::Compilation::CleanupFileList(), Diag(), clang::driver::ArgList::end(), clang::driver::Compilation::ExecuteJob(), clang::driver::Compilation::getActions(), clang::driver::Compilation::getArgs(), clang::driver::Compilation::getDefaultToolChain(), clang::driver::Compilation::getJobs(), clang::driver::Arg::getOption(), clang::driver::types::getPreprocessedType(), clang::driver::Compilation::getTempFiles(), clang::driver::ToolChain::getTriple(), clang::driver::ArgList::hasArg(), clang::DiagnosticsEngine::hasErrorOccurred(), clang::driver::Compilation::initCompilationForDiagnostics(), clang::driver::Option::matches(), clang::driver::Compilation::PrintJob(), clang::DiagnosticsEngine::Reset(), and clang::driver::types::TY_INVALID.
| const std::string& clang::driver::Driver::getCCCGenericGCCName | ( | ) | const [inline] |
Name to use when invoking gcc/g++.
Definition at line 203 of file Driver.h.
Referenced by clang::driver::tools::gcc::Common::ConstructJob().
| bool clang::driver::Driver::getCheckInputsExist | ( | ) | const [inline] |
| const char* clang::driver::Driver::getClangProgramPath | ( | ) | const [inline] |
Get the path to the main clang executable.
Definition at line 218 of file Driver.h.
References ClangExecutable.
| const DiagnosticsEngine& clang::driver::Driver::getDiags | ( | ) | const [inline] |
| std::string Driver::GetFilePath | ( | const char * | Name, |
| const ToolChain & | TC | ||
| ) | const |
GetFilePath - Lookup
Definition at line 1458 of file Driver.cpp.
References Dir, clang::driver::ToolChain::getFilePaths(), Name, P, PrefixDirs, ResourceDir, and SysRoot.
Referenced by clang::driver::ToolChain::GetFilePath(), and HandleImmediateArgs().
| const char* clang::driver::Driver::getInstalledDir | ( | ) | const [inline] |
Get the path to where the clang executable was installed.
Definition at line 223 of file Driver.h.
References Dir, and InstalledDir.
| const char * Driver::GetNamedOutputPath | ( | Compilation & | C, |
| const JobAction & | JA, | ||
| const char * | BaseInput, | ||
| bool | AtTopLevel | ||
| ) | const |
GetNamedOutputPath - Return the name to use for the output of the action
| C | - The compilation. |
| JA | - The action of interest. |
| BaseInput | - The original input file that this action was triggered by. |
| AtTopLevel | - Whether this is a "top-level" action. |
Definition at line 1382 of file Driver.cpp.
References clang::driver::Compilation::addResultFile(), clang::driver::Compilation::addTempFile(), clang::driver::types::appendSuffixForType(), CCGenDiagnostics, DefaultImageName, clang::driver::Compilation::getArgs(), clang::driver::ArgList::getLastArg(), GetTemporaryPath(), clang::driver::Action::getType(), clang::driver::types::getTypeTempSuffix(), clang::driver::ArgList::hasArg(), clang::driver::DerivedArgList::MakeArgString(), and Name.
Referenced by BuildJobsForAction().
| const OptTable& clang::driver::Driver::getOpts | ( | ) | const [inline] |
Definition at line 206 of file Driver.h.
Referenced by ParseArgStrings(), PrintHelp(), and clang::driver::toolchains::Darwin::TranslateArgs().
| std::string Driver::GetProgramPath | ( | const char * | Name, |
| const ToolChain & | TC, | ||
| bool | WantFile = false |
||
| ) | const |
GetProgramPath - Lookup
Definition at line 1505 of file Driver.cpp.
References DefaultTargetTriple, clang::driver::ToolChain::getProgramPaths(), isPathExecutable(), Name, P, and PrefixDirs.
Referenced by clang::driver::ToolChain::GetProgramPath(), and HandleImmediateArgs().
| bool Driver::GetReleaseVersion | ( | const char * | 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.
GetReleaseVersion - Parse (([0-9]+)(.([0-9]+)(.([0-9]+)?))?)? and return the grouped values as integers. Numbers which are not provided are set to 0.
Definition at line 1731 of file Driver.cpp.
| std::string Driver::GetTemporaryPath | ( | StringRef | Prefix, |
| const char * | 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 1544 of file Driver.cpp.
Referenced by clang::driver::tools::darwin::Compile::ConstructJob(), and GetNamedOutputPath().
| const std::string& clang::driver::Driver::getTitle | ( | ) | [inline] |
Definition at line 214 of file Driver.h.
References DriverTitle.
| bool Driver::HandleImmediateArgs | ( | const Compilation & | C | ) |
HandleImmediateArgs - Handle any arguments which should be treated before building actions or binding tools.
Definition at line 591 of file Driver.cpp.
References clang::driver::Compilation::getArgs(), clang::driver::Compilation::getDefaultToolChain(), GetFilePath(), clang::driver::ToolChain::getFilePaths(), clang::driver::ArgList::getLastArg(), GetProgramPath(), clang::driver::ToolChain::getProgramPaths(), clang::driver::ToolChain::getTriple(), clang::driver::ToolChain::getTripleString(), clang::driver::Arg::getValue(), clang::driver::ArgList::hasArg(), PrintDiagnosticCategories(), PrintHelp(), PrintVersion(), and ResourceDir.
Referenced by BuildCompilation().
| bool Driver::IsUsingLTO | ( | const ArgList & | Args | ) | const |
Definition at line 1147 of file Driver.cpp.
References clang::driver::ArgList::getLastArg(), clang::driver::Arg::getOption(), clang::driver::ArgList::hasArg(), clang::driver::ArgList::hasFlag(), and clang::driver::Option::matches().
Referenced by clang::driver::tools::linuxtools::Link::ConstructJob(), and ConstructPhaseAction().
| InputArgList * Driver::ParseArgStrings | ( | ArrayRef< const char * > | Args | ) |
ParseArgStrings - Parse the given list of strings into an ArgList.
Definition at line 100 of file Driver.cpp.
References Args, clang::driver::ArgList::begin(), Diag(), clang::driver::ArgList::end(), clang::driver::InputArgList::getArgString(), clang::driver::Arg::getAsString(), clang::driver::Arg::getOption(), getOpts(), clang::driver::Option::isUnsupported(), and clang::driver::OptTable::ParseArgs().
Referenced by BuildCompilation().
| void Driver::PrintActions | ( | const Compilation & | C | ) | const |
PrintActions - Print the list of actions.
Definition at line 758 of file Driver.cpp.
References clang::driver::Compilation::getActions(), and PrintActions1().
Referenced by BuildCompilation().
| void Driver::PrintHelp | ( | bool | ShowHidden | ) | const |
PrintHelp - Print the help text.
| ShowHidden | - Show hidden options. |
Definition at line 564 of file Driver.cpp.
References DriverTitle, getOpts(), Name, and clang::driver::OptTable::PrintHelp().
Referenced by HandleImmediateArgs().
| void Driver::PrintOptions | ( | const ArgList & | Args | ) | const |
PrintOptions - Print the list of arguments.
Definition at line 547 of file Driver.cpp.
References clang::driver::ArgList::begin(), clang::driver::ArgList::end(), clang::driver::Option::getName(), clang::driver::Arg::getNumValues(), clang::driver::Arg::getOption(), and clang::driver::Arg::getValue().
Referenced by BuildCompilation().
| void Driver::PrintVersion | ( | const Compilation & | C, |
| raw_ostream & | OS | ||
| ) | const |
PrintVersion - Print the driver version.
Definition at line 569 of file Driver.cpp.
References clang::getClangFullVersion(), clang::driver::Compilation::getDefaultToolChain(), and clang::driver::ToolChain::getTripleString().
Referenced by HandleImmediateArgs().
| void clang::driver::Driver::setCheckInputsExist | ( | bool | Value | ) | [inline] |
Definition at line 212 of file Driver.h.
Referenced by clang::createInvocationFromCommandLine().
| void clang::driver::Driver::setInstalledDir | ( | StringRef | Value | ) | [inline] |
Definition at line 228 of file Driver.h.
References InstalledDir.
| void clang::driver::Driver::setTitle | ( | std::string | Value | ) | [inline] |
Definition at line 215 of file Driver.h.
References DriverTitle.
| bool Driver::ShouldUseClangCompiler | ( | const Compilation & | C, |
| const JobAction & | JA, | ||
| const llvm::Triple & | ArchName | ||
| ) | const |
ShouldUseClangCompilar - Should the clang compiler be used to handle this action.
Definition at line 1687 of file Driver.cpp.
References clang::driver::Action::begin(), Diag(), clang::driver::Action::getType(), clang::driver::types::isAcceptedByClang(), clang::driver::types::isCXX(), clang::driver::types::isOnlyAcceptedByClang(), and clang::driver::Action::size().
| unsigned clang::driver::Driver::CCCEcho |
Echo commands while executing (in -v style).
Definition at line 120 of file Driver.h.
Referenced by BuildCompilation().
| unsigned clang::driver::Driver::CCCIsCPP |
Whether the driver is just the preprocessor.
Definition at line 117 of file Driver.h.
Referenced by BuildInputs(), CheckPreprocessingOptions(), and generateCompilationDiagnostics().
| unsigned clang::driver::Driver::CCCIsCXX |
Whether the driver should follow g++ like behavior.
Definition at line 114 of file Driver.h.
Referenced by AddLibgcc(), BuildCompilation(), BuildInputs(), clang::driver::tools::gcc::Common::ConstructJob(), clang::driver::tools::hexagon::Link::ConstructJob(), clang::driver::tools::openbsd::Link::ConstructJob(), clang::driver::tools::freebsd::Link::ConstructJob(), clang::driver::tools::netbsd::Link::ConstructJob(), clang::driver::tools::linuxtools::Link::ConstructJob(), clang::driver::tools::minix::Link::ConstructJob(), and clang::driver::tools::dragonfly::Link::ConstructJob().
Only print tool bindings, don't build any jobs.
Definition at line 123 of file Driver.h.
Referenced by BuildCompilation(), and BuildJobsForAction().
| unsigned clang::driver::Driver::CCCUsePCH |
Use lazy precompiled headers for PCH support.
Definition at line 161 of file Driver.h.
Referenced by BuildCompilation(), and clang::driver::tools::Clang::ConstructJob().
Whether the driver is generating diagnostics for debugging purposes.
Definition at line 139 of file Driver.h.
Referenced by BuildJobsForAction(), clang::driver::tools::Clang::ConstructJob(), generateCompilationDiagnostics(), and GetNamedOutputPath().
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 136 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 108 of file Driver.h.
Referenced by clang::driver::tools::Clang::ConstructJob().
Set CC_PRINT_HEADERS mode, which causes the frontend to log header include information to CCPrintHeadersFilename or to stderr.
Definition at line 131 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 105 of file Driver.h.
Referenced by clang::driver::tools::Clang::ConstructJob().
| const char* clang::driver::Driver::CCPrintOptionsFilename |
| std::string clang::driver::Driver::ClangExecutable |
The original path to the clang executable.
Definition at line 68 of file Driver.h.
Referenced by getClangProgramPath().
| std::string clang::driver::Driver::DefaultImageName |
Default name for linked images (e.g., "a.out").
Definition at line 93 of file Driver.h.
Referenced by BuildJobs(), and GetNamedOutputPath().
| std::string clang::driver::Driver::DefaultTargetTriple |
| std::string clang::driver::Driver::Dir |
The path the driver executable was in, as invoked from the command line.
Definition at line 65 of file Driver.h.
Referenced by addProfileRT(), BuildCompilation(), clang::driver::tools::linuxtools::Link::ConstructJob(), Driver(), GetFilePath(), and getInstalledDir().
| std::string clang::driver::Driver::DriverTitle |
Driver title to use with help.
Definition at line 96 of file Driver.h.
Referenced by getTitle(), PrintHelp(), and setTitle().
| std::string clang::driver::Driver::HostBits |
| std::string clang::driver::Driver::HostMachine |
| std::string clang::driver::Driver::HostRelease |
| std::string clang::driver::Driver::HostSystem |
| std::string clang::driver::Driver::InstalledDir |
The path to the installed clang directory, if any.
Definition at line 71 of file Driver.h.
Referenced by BuildCompilation(), clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::GCCInstallationDetector(), getInstalledDir(), and setInstalledDir().
| std::string clang::driver::Driver::Name |
The name the driver was invoked as.
Definition at line 61 of file Driver.h.
Referenced by BuildJobsForAction(), Driver(), GetFilePath(), GetNamedOutputPath(), GetProgramPath(), and PrintHelp().
Definition at line 81 of file Driver.h.
Referenced by BuildCompilation(), clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::GCCInstallationDetector(), GetFilePath(), and GetProgramPath().
| std::string clang::driver::Driver::ResourceDir |
The path to the compiler resource directory.
Definition at line 74 of file Driver.h.
Referenced by addAsanRTLinux(), clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), clang::driver::tools::Clang::ConstructJob(), Driver(), GetFilePath(), and HandleImmediateArgs().
| std::string clang::driver::Driver::SysRoot |
sysroot, if present
Definition at line 84 of file Driver.h.
Referenced by clang::driver::toolchains::Linux::AddClangSystemIncludeArgs(), BuildCompilation(), clang::driver::tools::freebsd::Link::ConstructJob(), clang::driver::tools::netbsd::Link::ConstructJob(), clang::driver::tools::linuxtools::Link::ConstructJob(), clang::driver::tools::dragonfly::Link::ConstructJob(), clang::driver::toolchains::FreeBSD::FreeBSD(), clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::GCCInstallationDetector(), GetFilePath(), and clang::driver::toolchains::Linux::Linux().
If the standard library is used.
Definition at line 87 of file Driver.h.
Referenced by BuildCompilation().