10 #ifndef LLVM_CLANG_DRIVER_TOOLCHAIN_H
11 #define LLVM_CLANG_DRIVER_TOOLCHAIN_H
19 #include "llvm/ADT/SmallVector.h"
20 #include "llvm/ADT/Triple.h"
21 #include "llvm/Target/TargetOptions.h"
41 class CudaInstallationDetector;
44 class RegisterEffectiveTriple;
73 const llvm::Triple Triple;
74 const llvm::opt::ArgList &Args;
76 const llvm::opt::Arg *
const CachedRTTIArg;
87 mutable std::unique_ptr<Tool> Clang;
88 mutable std::unique_ptr<Tool> Assemble;
89 mutable std::unique_ptr<Tool> Link;
90 mutable std::unique_ptr<Tool> OffloadBundler;
91 Tool *getClang()
const;
92 Tool *getAssemble()
const;
93 Tool *getLink()
const;
94 Tool *getClangAs()
const;
95 Tool *getOffloadBundler()
const;
97 mutable std::unique_ptr<SanitizerArgs> SanitizerArguments;
98 mutable std::unique_ptr<XRayArgs> XRayArguments;
101 mutable llvm::Triple EffectiveTriple;
104 void setEffectiveTriple(llvm::Triple ET)
const {
105 EffectiveTriple = std::move(ET);
114 const llvm::opt::ArgList &Args);
123 llvm::opt::ArgStringList &CC1Args,
126 llvm::opt::ArgStringList &CC1Args,
130 llvm::opt::ArgStringList &CC1Args,
133 llvm::opt::ArgStringList &CC1Args,
144 const llvm::Triple &
getTriple()
const {
return Triple; }
153 llvm::Triple::ArchType
getArch()
const {
return Triple.getArch(); }
156 StringRef
getOS()
const {
return Triple.getOSName(); }
163 return Triple.getTriple();
168 assert(!EffectiveTriple.getTriple().empty() &&
"No effective triple");
169 return EffectiveTriple;
185 const llvm::opt::Arg *
getRTTIArg()
const {
return CachedRTTIArg; }
201 static std::pair<std::string, std::string>
214 virtual llvm::opt::DerivedArgList *
301 virtual std::string
getCompilerRT(
const llvm::opt::ArgList &Args,
303 bool Shared =
false)
const;
307 bool Shared =
false)
const;
357 return llvm::DebuggerKind::GDB;
388 const llvm::opt::ArgList &Args,
410 llvm::opt::ArgStringList &CC1Args)
const;
414 llvm::opt::ArgStringList &CC1Args,
433 llvm::opt::ArgStringList &CC1Args)
const;
438 llvm::opt::ArgStringList &CmdArgs)
const;
442 llvm::opt::ArgStringList &CmdArgs)
const;
447 llvm::opt::ArgStringList &CmdArgs)
const;
454 const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs)
const;
458 llvm::opt::ArgStringList &CmdArgs)
const;
462 llvm::opt::ArgStringList &CC1Args)
const;
466 llvm::opt::ArgStringList &CC1Args)
const;
470 const llvm::opt::ArgList &Args)
const;
486 TC.setEffectiveTriple(std::move(T));
Represents a version number in the form major[.minor[.subminor[.build]]].
Set a ToolChain's effective triple.
RegisterEffectiveTriple(const ToolChain &TC, llvm::Triple T)
Defines the clang::SanitizerKind enum.
The virtual file system interface.
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
The basic abstraction for the target Objective-C runtime.
Defines the clang::VersionTuple class, which represents a version in the form major[.minor[.subminor]].
~RegisterEffectiveTriple()