clang  19.0.0git
Namespaces | Classes | Typedefs | Enumerations | Functions
clang::driver Namespace Reference

Namespaces

 options
 
 phases
 
 toolchains
 
 tools
 
 types
 

Classes

class  Action
 Action - Represent an abstract compilation step to perform. More...
 
class  InputAction
 
class  BindArchAction
 
class  OffloadAction
 An offload action combines host or/and device actions according to the programming model implementation needs and propagates the offloading kind to its dependences. More...
 
class  JobAction
 
class  PreprocessJobAction
 
class  PrecompileJobAction
 
class  ExtractAPIJobAction
 
class  AnalyzeJobAction
 
class  MigrateJobAction
 
class  CompileJobAction
 
class  BackendJobAction
 
class  AssembleJobAction
 
class  IfsMergeJobAction
 
class  LinkJobAction
 
class  LipoJobAction
 
class  DsymutilJobAction
 
class  VerifyJobAction
 
class  VerifyDebugInfoJobAction
 
class  VerifyPCHJobAction
 
class  OffloadBundlingJobAction
 
class  OffloadUnbundlingJobAction
 
class  OffloadWrapperJobAction
 
class  OffloadPackagerJobAction
 
class  OffloadDepsJobAction
 
class  SPIRVTranslatorJobAction
 
class  SYCLPostLinkJobAction
 
class  BackendCompileJobAction
 
class  FileTableTformJobAction
 
class  AppendFooterJobAction
 
class  SpirvToIrWrapperJobAction
 
class  LinkerWrapperJobAction
 
class  StaticLibJobAction
 
class  ForEachWrappingAction
 Wrap all jobs performed between TFormInput (excluded) and Job (included) behind a llvm-foreach call. More...
 
class  BinaryAnalyzeJobAction
 
class  Compilation
 Compilation - A set of tasks to perform for a single driver invocation. More...
 
class  Distro
 Distro - Helper class for detecting and classifying Linux distributions. More...
 
class  Driver
 Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like command line arguments. More...
 
class  InputInfo
 InputInfo - Wrapper for information about an input source. More...
 
struct  CrashReportInfo
 
struct  ResponseFileSupport
 
class  Command
 Command - An executable path/name and argument vector to execute. More...
 
class  CC1Command
 Use the CC1 tool callback when available, to avoid creating a new process. More...
 
class  JobList
 JobList - A sequence of jobs to perform. More...
 
class  Multilib
 This corresponds to a single GCC Multilib, or a segment of one controlled by a command line flag. More...
 
class  MultilibSet
 See also MultilibSetBuilder for combining multilibs into a set. More...
 
class  MultilibBuilder
 This corresponds to a single GCC multilib, or a segment of one controlled by a command line flag. More...
 
class  MultilibSetBuilder
 This class can be used to create a MultilibSet, and contains helper functions to add combinations of multilibs before creating a MultilibSet instance with makeMultilibSet(). More...
 
class  SanitizerArgs
 
class  Tool
 Tool - Information on a specific compilation tool. More...
 
struct  ParsedClangName
 Helper structure used to pass information extracted from clang executable name such as i686-linux-android-g++. More...
 
class  ToolChain
 ToolChain - Access to tools for a single platform. More...
 
class  RegisterEffectiveTriple
 Set a ToolChain's effective triple. More...
 
class  XRayArgs
 
class  CudaInstallationDetector
 A class to find a viable CUDA installation. More...
 
struct  DetectedMultilibs
 
struct  DeviceLibABIVersion
 ABI version of device library. More...
 
class  RocmInstallationDetector
 A class to find a viable ROCM installation TODO: Generalize to handle libclc. More...
 
class  SYCLInstallationDetector
 

Typedefs

typedef SmallVector< InputInfo, 4 > InputInfoList
 
typedef llvm::DenseMap< const JobAction *, const char * > ArgStringMap
 ArgStringMap - Type used to map a JobAction to its result file. More...
 
typedef SmallVector< Action *, 3 > ActionList
 ActionList - Type used for lists of actions. More...
 
typedef SmallVector< std::pair< const char *, types::ID >, 16 > TempFileList
 TempFileList - A list of temporary files and their types. More...
 

Enumerations

enum  LTOKind { LTOK_None , LTOK_Full , LTOK_Thin , LTOK_Unknown }
 Describes the kind of LTO mode selected via -f(no-)?lto(=.*)? options. More...
 
enum  ModuleHeaderMode { HeaderMode_None , HeaderMode_Default , HeaderMode_User , HeaderMode_System }
 Whether headers used to construct C++20 module units should be looked up by the path supplied on the command line, or in the user or system search paths. More...
 

Functions

bool isOptimizationLevelFast (const llvm::opt::ArgList &Args)
 
bool isObjectFile (std::string FileName)
 
bool isStaticArchiveFile (const StringRef &FileName)
 
bool willEmitRemarks (const llvm::opt::ArgList &Args)
 
llvm::StringRef getDriverMode (StringRef ProgName, ArrayRef< const char * > Args)
 Returns the driver mode option's value, i.e. More...
 
bool IsClangCL (StringRef DriverMode)
 Checks whether the value produced by getDriverMode is for CL mode. More...
 
llvm::Error expandResponseFiles (SmallVectorImpl< const char * > &Args, bool ClangCLMode, llvm::BumpPtrAllocator &Alloc, llvm::vfs::FileSystem *FS=nullptr)
 Expand response files from a clang driver or cc1 invocation. More...
 
void applyOverrideOptions (SmallVectorImpl< const char * > &Args, const char *OverrideOpts, llvm::StringSet<> &SavedStrings, raw_ostream *OS=nullptr)
 Apply a space separated list of edits to the input argument lists. More...
 
raw_ostream & operator<< (raw_ostream &OS, const Multilib &M)
 
raw_ostream & operator<< (raw_ostream &OS, const MultilibSet &MS)
 
const llvm::opt::OptTable & getDriverOptTable ()
 
bool findMIPSMultilibs (const Driver &D, const llvm::Triple &TargetTriple, StringRef Path, const llvm::opt::ArgList &Args, DetectedMultilibs &Result)
 
bool isSYCLNativeCPU (const llvm::opt::ArgList &Args)
 
bool isSYCLNativeCPU (const llvm::Triple &HostT, const llvm::Triple &DevT)
 
bool isSYCLNativeCPU (const ToolChain &TC)
 

Typedef Documentation

◆ ActionList

ActionList - Type used for lists of actions.

Definition at line 25 of file Util.h.

◆ ArgStringMap

typedef llvm::DenseMap<const JobAction*, const char*> clang::driver::ArgStringMap

ArgStringMap - Type used to map a JobAction to its result file.

Definition at line 22 of file Util.h.

◆ InputInfoList

Definition at line 50 of file Driver.h.

◆ TempFileList

typedef SmallVector<std::pair<const char *, types::ID>, 16> clang::driver::TempFileList

TempFileList - A list of temporary files and their types.

Definition at line 28 of file Util.h.

Enumeration Type Documentation

◆ LTOKind

Describes the kind of LTO mode selected via -f(no-)?lto(=.*)? options.

Enumerator
LTOK_None 
LTOK_Full 
LTOK_Thin 
LTOK_Unknown 

Definition at line 58 of file Driver.h.

◆ ModuleHeaderMode

Whether headers used to construct C++20 module units should be looked up by the path supplied on the command line, or in the user or system search paths.

Enumerator
HeaderMode_None 
HeaderMode_Default 
HeaderMode_User 
HeaderMode_System 

Definition at line 68 of file Driver.h.

Function Documentation

◆ applyOverrideOptions()

void clang::driver::applyOverrideOptions ( SmallVectorImpl< const char * > &  Args,
const char *  OverrideOpts,
llvm::StringSet<> &  SavedStrings,
raw_ostream *  OS = nullptr 
)

Apply a space separated list of edits to the input argument lists.

See applyOneOverrideOption.

Definition at line 10587 of file Driver.cpp.

◆ expandResponseFiles()

llvm::Error clang::driver::expandResponseFiles ( SmallVectorImpl< const char * > &  Args,
bool  ClangCLMode,
llvm::BumpPtrAllocator &  Alloc,
llvm::vfs::FileSystem *  FS = nullptr 
)

Expand response files from a clang driver or cc1 invocation.

Parameters
ArgsThe arguments that will be expanded.
ClangCLModeWhether clang is in CL mode.
AllocAllocator for new arguments.
FSFilesystem to use when expanding files.

Definition at line 10433 of file Driver.cpp.

◆ findMIPSMultilibs()

bool clang::driver::findMIPSMultilibs ( const Driver D,
const llvm::Triple &  TargetTriple,
StringRef  Path,
const llvm::opt::ArgList &  Args,
DetectedMultilibs Result 
)

◆ getDriverMode()

llvm::StringRef clang::driver::getDriverMode ( StringRef  ProgName,
ArrayRef< const char * >  Args 
)

Returns the driver mode option's value, i.e.

X in --driver-mode=X. If Args doesn't mention one explicitly, tries to deduce from ProgName. Returns empty on failure. Common values are "gcc", "g++", "cpp", "cl" and "flang". Returned value need not be one of these.

Definition at line 10416 of file Driver.cpp.

References clang::driver::ParsedClangName::DriverMode, getDriverOptTable(), and clang::driver::ToolChain::getTargetAndModeFromProgramName().

Referenced by clang::driver::Driver::BuildCompilation().

◆ getDriverOptTable()

const llvm::opt::OptTable & clang::driver::getDriverOptTable ( )

◆ IsClangCL()

bool clang::driver::IsClangCL ( StringRef  DriverMode)

Checks whether the value produced by getDriverMode is for CL mode.

Definition at line 10431 of file Driver.cpp.

◆ isObjectFile()

bool clang::driver::isObjectFile ( std::string  FileName)
Returns
True if the filename has a valid object file extension.

Definition at line 10369 of file Driver.cpp.

References clang::FileName, and clang::driver::types::lookupTypeForExtension().

Referenced by getLinkerArgs(), getOffloadSections(), and hasSYCLDefaultSection().

◆ isOptimizationLevelFast()

bool clang::driver::isOptimizationLevelFast ( const llvm::opt::ArgList &  Args)
Returns
True if the last defined optimization level is -Ofast. And False otherwise.

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

◆ isStaticArchiveFile()

bool clang::driver::isStaticArchiveFile ( const StringRef &  FileName)
Returns
True if the filename has a static archive/lib extension.

Definition at line 10383 of file Driver.cpp.

References clang::FileName.

Referenced by getLinkerArgs(), getOffloadSections(), hasFPGABinary(), and hasSYCLDefaultSection().

◆ isSYCLNativeCPU() [1/3]

bool clang::driver::isSYCLNativeCPU ( const llvm::opt::ArgList &  Args)
inline

◆ isSYCLNativeCPU() [2/3]

bool clang::driver::isSYCLNativeCPU ( const llvm::Triple &  HostT,
const llvm::Triple &  DevT 
)
inline

Definition at line 246 of file SYCL.h.

◆ isSYCLNativeCPU() [3/3]

bool clang::driver::isSYCLNativeCPU ( const ToolChain TC)
inline

◆ operator<<() [1/2]

raw_ostream & clang::driver::operator<< ( raw_ostream &  OS,
const Multilib M 
)

Definition at line 85 of file Multilib.cpp.

References clang::driver::Multilib::print().

◆ operator<<() [2/2]

raw_ostream & clang::driver::operator<< ( raw_ostream &  OS,
const MultilibSet MS 
)

Definition at line 320 of file Multilib.cpp.

References clang::driver::MultilibSet::print().

◆ willEmitRemarks()

bool clang::driver::willEmitRemarks ( const llvm::opt::ArgList &  Args)