clang  15.0.0git
OpenBSD.cpp
Go to the documentation of this file.
1 //===--- OpenBSD.cpp - OpenBSD ToolChain Implementations --------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include "OpenBSD.h"
10 #include "Arch/ARM.h"
11 #include "Arch/Mips.h"
12 #include "Arch/Sparc.h"
13 #include "CommonArgs.h"
14 #include "clang/Config/config.h"
16 #include "clang/Driver/Options.h"
18 #include "llvm/Option/ArgList.h"
19 #include "llvm/Support/Path.h"
20 
21 using namespace clang::driver;
22 using namespace clang::driver::tools;
23 using namespace clang::driver::toolchains;
24 using namespace clang;
25 using namespace llvm::opt;
26 
28  const InputInfo &Output,
29  const InputInfoList &Inputs,
30  const ArgList &Args,
31  const char *LinkingOutput) const {
33  static_cast<const toolchains::OpenBSD &>(getToolChain());
34  const Driver &D = ToolChain.getDriver();
35  const llvm::Triple &Triple = ToolChain.getTriple();
36 
37  claimNoWarnArgs(Args);
38  ArgStringList CmdArgs;
39 
40  switch (ToolChain.getArch()) {
41  case llvm::Triple::x86:
42  // When building 32-bit code on OpenBSD/amd64, we have to explicitly
43  // instruct as in the base system to assemble 32-bit code.
44  CmdArgs.push_back("--32");
45  break;
46 
47  case llvm::Triple::arm:
48  case llvm::Triple::armeb: {
49  StringRef MArch, MCPU;
50  arm::getARMArchCPUFromArgs(Args, MArch, MCPU, /*FromAs*/ true);
51  std::string Arch = arm::getARMTargetCPU(MCPU, MArch, Triple);
52  CmdArgs.push_back(Args.MakeArgString("-mcpu=" + Arch));
53  break;
54  }
55 
56  case llvm::Triple::ppc:
57  CmdArgs.push_back("-mppc");
58  CmdArgs.push_back("-many");
59  break;
60 
61  case llvm::Triple::sparcv9: {
62  CmdArgs.push_back("-64");
63  std::string CPU = getCPUName(D, Args, Triple);
64  CmdArgs.push_back(sparc::getSparcAsmModeForCPU(CPU, Triple));
65  AddAssemblerKPIC(ToolChain, Args, CmdArgs);
66  break;
67  }
68 
69  case llvm::Triple::mips64:
70  case llvm::Triple::mips64el: {
71  StringRef CPUName;
72  StringRef ABIName;
73  mips::getMipsCPUAndABI(Args, Triple, CPUName, ABIName);
74 
75  CmdArgs.push_back("-march");
76  CmdArgs.push_back(CPUName.data());
77 
78  CmdArgs.push_back("-mabi");
79  CmdArgs.push_back(mips::getGnuCompatibleMipsABIName(ABIName).data());
80 
81  if (Triple.isLittleEndian())
82  CmdArgs.push_back("-EL");
83  else
84  CmdArgs.push_back("-EB");
85 
86  AddAssemblerKPIC(ToolChain, Args, CmdArgs);
87  break;
88  }
89 
90  default:
91  break;
92  }
93 
94  Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, options::OPT_Xassembler);
95 
96  CmdArgs.push_back("-o");
97  CmdArgs.push_back(Output.getFilename());
98 
99  for (const auto &II : Inputs)
100  CmdArgs.push_back(II.getFilename());
101 
102  const char *Exec = Args.MakeArgString(ToolChain.GetProgramPath("as"));
103  C.addCommand(std::make_unique<Command>(JA, *this,
105  Exec, CmdArgs, Inputs, Output));
106 }
107 
109  const InputInfo &Output,
110  const InputInfoList &Inputs,
111  const ArgList &Args,
112  const char *LinkingOutput) const {
114  static_cast<const toolchains::OpenBSD &>(getToolChain());
115  const Driver &D = ToolChain.getDriver();
116  ArgStringList CmdArgs;
117 
118  // Silence warning for "clang -g foo.o -o foo"
119  Args.ClaimAllArgs(options::OPT_g_Group);
120  // and "clang -emit-llvm foo.o -o foo"
121  Args.ClaimAllArgs(options::OPT_emit_llvm);
122  // and for "clang -w foo.o -o foo". Other warning options are already
123  // handled somewhere else.
124  Args.ClaimAllArgs(options::OPT_w);
125 
126  if (!D.SysRoot.empty())
127  CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot));
128 
129  if (ToolChain.getArch() == llvm::Triple::mips64)
130  CmdArgs.push_back("-EB");
131  else if (ToolChain.getArch() == llvm::Triple::mips64el)
132  CmdArgs.push_back("-EL");
133 
134  if (!Args.hasArg(options::OPT_nostdlib, options::OPT_shared)) {
135  CmdArgs.push_back("-e");
136  CmdArgs.push_back("__start");
137  }
138 
139  CmdArgs.push_back("--eh-frame-hdr");
140  if (Args.hasArg(options::OPT_static)) {
141  CmdArgs.push_back("-Bstatic");
142  } else {
143  if (Args.hasArg(options::OPT_rdynamic))
144  CmdArgs.push_back("-export-dynamic");
145  CmdArgs.push_back("-Bdynamic");
146  if (Args.hasArg(options::OPT_shared)) {
147  CmdArgs.push_back("-shared");
148  } else {
149  CmdArgs.push_back("-dynamic-linker");
150  CmdArgs.push_back("/usr/libexec/ld.so");
151  }
152  }
153 
154  if (Args.hasArg(options::OPT_pie))
155  CmdArgs.push_back("-pie");
156  if (Args.hasArg(options::OPT_nopie) || Args.hasArg(options::OPT_pg))
157  CmdArgs.push_back("-nopie");
158 
159  if (Output.isFilename()) {
160  CmdArgs.push_back("-o");
161  CmdArgs.push_back(Output.getFilename());
162  } else {
163  assert(Output.isNothing() && "Invalid output.");
164  }
165 
166  if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles,
167  options::OPT_r)) {
168  const char *crt0 = nullptr;
169  const char *crtbegin = nullptr;
170  if (!Args.hasArg(options::OPT_shared)) {
171  if (Args.hasArg(options::OPT_pg))
172  crt0 = "gcrt0.o";
173  else if (Args.hasArg(options::OPT_static) &&
174  !Args.hasArg(options::OPT_nopie))
175  crt0 = "rcrt0.o";
176  else
177  crt0 = "crt0.o";
178  crtbegin = "crtbegin.o";
179  } else {
180  crtbegin = "crtbeginS.o";
181  }
182 
183  if (crt0)
184  CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath(crt0)));
185  CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath(crtbegin)));
186  }
187 
188  Args.AddAllArgs(CmdArgs, options::OPT_L);
189  ToolChain.AddFilePathLibArgs(Args, CmdArgs);
190  Args.AddAllArgs(CmdArgs, {options::OPT_T_Group, options::OPT_e,
191  options::OPT_s, options::OPT_t,
192  options::OPT_Z_Flag, options::OPT_r});
193 
194  bool NeedsSanitizerDeps = addSanitizerRuntimes(ToolChain, Args, CmdArgs);
195  bool NeedsXRayDeps = addXRayRuntime(ToolChain, Args, CmdArgs);
196  AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs, JA);
197 
198  if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs,
199  options::OPT_r)) {
200  // Use the static OpenMP runtime with -static-openmp
201  bool StaticOpenMP = Args.hasArg(options::OPT_static_openmp) &&
202  !Args.hasArg(options::OPT_static);
203  addOpenMPRuntime(CmdArgs, ToolChain, Args, StaticOpenMP);
204 
205  if (D.CCCIsCXX()) {
206  if (ToolChain.ShouldLinkCXXStdlib(Args))
207  ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs);
208  if (Args.hasArg(options::OPT_pg))
209  CmdArgs.push_back("-lm_p");
210  else
211  CmdArgs.push_back("-lm");
212  }
213  if (NeedsSanitizerDeps) {
214  CmdArgs.push_back(ToolChain.getCompilerRTArgString(Args, "builtins"));
216  }
217  if (NeedsXRayDeps) {
218  CmdArgs.push_back(ToolChain.getCompilerRTArgString(Args, "builtins"));
219  linkXRayRuntimeDeps(ToolChain, CmdArgs);
220  }
221  // FIXME: For some reason GCC passes -lgcc before adding
222  // the default system libraries. Just mimic this for now.
223  CmdArgs.push_back("-lcompiler_rt");
224 
225  if (Args.hasArg(options::OPT_pthread)) {
226  if (!Args.hasArg(options::OPT_shared) && Args.hasArg(options::OPT_pg))
227  CmdArgs.push_back("-lpthread_p");
228  else
229  CmdArgs.push_back("-lpthread");
230  }
231 
232  if (!Args.hasArg(options::OPT_shared)) {
233  if (Args.hasArg(options::OPT_pg))
234  CmdArgs.push_back("-lc_p");
235  else
236  CmdArgs.push_back("-lc");
237  }
238 
239  CmdArgs.push_back("-lcompiler_rt");
240  }
241 
242  if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles,
243  options::OPT_r)) {
244  const char *crtend = nullptr;
245  if (!Args.hasArg(options::OPT_shared))
246  crtend = "crtend.o";
247  else
248  crtend = "crtendS.o";
249 
250  CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath(crtend)));
251  }
252 
253  ToolChain.addProfileRTLibs(Args, CmdArgs);
254 
255  const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
256  C.addCommand(std::make_unique<Command>(JA, *this,
258  Exec, CmdArgs, Inputs, Output));
259 }
260 
261 SanitizerMask OpenBSD::getSupportedSanitizers() const {
262  const bool IsX86 = getTriple().getArch() == llvm::Triple::x86;
263  const bool IsX86_64 = getTriple().getArch() == llvm::Triple::x86_64;
264 
265  // For future use, only UBsan at the moment
267 
268  if (IsX86 || IsX86_64) {
269  Res |= SanitizerKind::Vptr;
270  Res |= SanitizerKind::Fuzzer;
271  Res |= SanitizerKind::FuzzerNoLink;
272  }
273 
274  return Res;
275 }
276 
277 /// OpenBSD - OpenBSD tool chain which can call as(1) and ld(1) directly.
278 
279 OpenBSD::OpenBSD(const Driver &D, const llvm::Triple &Triple,
280  const ArgList &Args)
281  : Generic_ELF(D, Triple, Args) {
282  getFilePaths().push_back(getDriver().SysRoot + "/usr/lib");
283 }
284 
286  const llvm::opt::ArgList &DriverArgs,
287  llvm::opt::ArgStringList &CC1Args) const {
288  const Driver &D = getDriver();
289 
290  if (DriverArgs.hasArg(clang::driver::options::OPT_nostdinc))
291  return;
292 
293  if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) {
295  llvm::sys::path::append(Dir, "include");
296  addSystemInclude(DriverArgs, CC1Args, Dir.str());
297  }
298 
299  if (DriverArgs.hasArg(options::OPT_nostdlibinc))
300  return;
301 
302  // Check for configure-time C include directories.
303  StringRef CIncludeDirs(C_INCLUDE_DIRS);
304  if (CIncludeDirs != "") {
306  CIncludeDirs.split(dirs, ":");
307  for (StringRef dir : dirs) {
308  StringRef Prefix =
309  llvm::sys::path::is_absolute(dir) ? StringRef(D.SysRoot) : "";
310  addExternCSystemInclude(DriverArgs, CC1Args, Prefix + dir);
311  }
312  return;
313  }
314 
315  addExternCSystemInclude(DriverArgs, CC1Args, D.SysRoot + "/usr/include");
316 }
317 
318 void OpenBSD::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
319  llvm::opt::ArgStringList &CC1Args) const {
320  addSystemInclude(DriverArgs, CC1Args,
321  getDriver().SysRoot + "/usr/include/c++/v1");
322 }
323 
324 void OpenBSD::AddCXXStdlibLibArgs(const ArgList &Args,
325  ArgStringList &CmdArgs) const {
326  bool Profiling = Args.hasArg(options::OPT_pg);
327 
328  CmdArgs.push_back(Profiling ? "-lc++_p" : "-lc++");
329  CmdArgs.push_back(Profiling ? "-lc++abi_p" : "-lc++abi");
330  CmdArgs.push_back(Profiling ? "-lpthread_p" : "-lpthread");
331 }
332 
334  StringRef Component,
335  FileType Type) const {
336  SmallString<128> Path(getDriver().SysRoot);
337  llvm::sys::path::append(Path, "/usr/lib/libcompiler_rt.a");
338  return std::string(Path.str());
339 }
340 
342  return new tools::openbsd::Assembler(*this);
343 }
344 
345 Tool *OpenBSD::buildLinker() const { return new tools::openbsd::Linker(*this); }
346 
347 bool OpenBSD::HasNativeLLVMSupport() const { return true; }
348 
349 bool OpenBSD::IsUnwindTablesDefault(const ArgList &Args) const {
350  switch (getArch()) {
351  case llvm::Triple::arm:
352  return false;
353  default:
354  return true;
355  }
356 }
clang::driver::tools::mips::getGnuCompatibleMipsABIName
StringRef getGnuCompatibleMipsABIName(StringRef ABI)
Definition: Mips.cpp:143
clang::driver::toolchains
Definition: AIX.h:55
Mips.h
clang::driver::toolchains::OpenBSD::addLibCxxIncludePaths
void addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override
Definition: OpenBSD.cpp:318
clang::driver::tools::AddAssemblerKPIC
void AddAssemblerKPIC(const ToolChain &ToolChain, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs)
string
string(SUBSTRING ${CMAKE_CURRENT_BINARY_DIR} 0 ${PATH_LIB_START} PATH_HEAD) string(SUBSTRING $
Definition: CMakeLists.txt:22
llvm::SmallVector
Definition: LLVM.h:38
clang::driver::ToolChain::GetProgramPath
std::string GetProgramPath(const char *Name) const
Definition: ToolChain.cpp:581
clang::driver::tools
Definition: AIX.h:17
clang::driver::ToolChain::getDriver
const Driver & getDriver() const
Definition: ToolChain.h:225
clang::driver::toolchains::OpenBSD::AddClangSystemIncludeArgs
void AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override
Add the clang cc1 arguments for system include paths.
Definition: OpenBSD.cpp:285
Sparc.h
clang::driver::tools::getCPUName
std::string getCPUName(const Driver &D, const llvm::opt::ArgList &Args, const llvm::Triple &T, bool FromAs=false)
clang::driver::ToolChain::GetFilePath
std::string GetFilePath(const char *Name) const
Definition: ToolChain.cpp:577
clang::driver::tools::openbsd::Assembler::ConstructJob
void ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const llvm::opt::ArgList &TCArgs, const char *LinkingOutput) const override
ConstructJob - Construct jobs to perform the action JA, writing to Output and with Inputs,...
Definition: OpenBSD.cpp:27
clang::driver::InputInfo
InputInfo - Wrapper for information about an input source.
Definition: InputInfo.h:22
clang::driver::toolchains::OpenBSD::getCompilerRT
std::string getCompilerRT(const llvm::opt::ArgList &Args, StringRef Component, FileType Type=ToolChain::FT_Static) const override
Definition: OpenBSD.cpp:333
clang::Type
The base class of the type hierarchy.
Definition: Type.h:1500
clang::driver::tools::AddLinkerInputs
void AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, const JobAction &JA)
clang::driver::ToolChain::getFilePaths
path_list & getFilePaths()
Definition: ToolChain.h:263
clang::driver::Tool
Tool - Information on a specific compilation tool.
Definition: Tool.h:32
clang::driver::toolchains::Generic_ELF
Definition: Gnu.h:362
clang::driver::tools::claimNoWarnArgs
void claimNoWarnArgs(const llvm::opt::ArgList &Args)
Options.h
clang::driver::InputInfo::isFilename
bool isFilename() const
Definition: InputInfo.h:75
llvm::opt
Definition: DiagnosticOptions.h:19
clang::driver::ResponseFileSupport::AtFileCurCP
static constexpr ResponseFileSupport AtFileCurCP()
Definition: Job.h:92
clang::driver::tools::openbsd::Linker
Definition: OpenBSD.h:36
clang::driver::InputInfo::isNothing
bool isNothing() const
Definition: InputInfo.h:74
llvm::SmallString< 128 >
clang::driver::ToolChain::getTriple
const llvm::Triple & getTriple() const
Definition: ToolChain.h:227
OpenBSD.h
clang::driver::Driver::SysRoot
std::string SysRoot
sysroot, if present
Definition: Driver.h:171
clang::driver::Driver::CCCIsCXX
bool CCCIsCXX() const
Whether the driver should follow g++ like behavior.
Definition: Driver.h:201
clang::driver::tools::openbsd::Linker::ConstructJob
void ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, const InputInfoList &Inputs, const llvm::opt::ArgList &TCArgs, const char *LinkingOutput) const override
ConstructJob - Construct jobs to perform the action JA, writing to Output and with Inputs,...
Definition: OpenBSD.cpp:108
clang::driver::tools::addXRayRuntime
bool addXRayRuntime(const ToolChain &TC, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs)
SanitizerArgs.h
clang::driver::Driver::ResourceDir
std::string ResourceDir
The path to the compiler resource directory.
Definition: Driver.h:155
clang::driver::ToolChain::getArch
llvm::Triple::ArchType getArch() const
Definition: ToolChain.h:241
clang::driver::ToolChain::AddFilePathLibArgs
void AddFilePathLibArgs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const
AddFilePathLibArgs - Add each thing in getFilePaths() as a "-L" option.
Definition: ToolChain.cpp:988
clang::driver::ToolChain::ShouldLinkCXXStdlib
bool ShouldLinkCXXStdlib(const llvm::opt::ArgList &Args) const
Returns if the C++ standard library should be linked in.
Definition: ToolChain.cpp:965
clang::driver::tools::openbsd::Assembler
Definition: OpenBSD.h:23
clang::driver::ToolChain::getSupportedSanitizers
virtual SanitizerMask getSupportedSanitizers() const
Return sanitizers which are available in this toolchain.
Definition: ToolChain.cpp:1031
clang::driver::ToolChain::AddCXXStdlibLibArgs
virtual void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const
AddCXXStdlibLibArgs - Add the system specific linker arguments to use for the given C++ standard libr...
Definition: ToolChain.cpp:971
Compilation.h
clang::driver::ToolChain::addProfileRTLibs
virtual void addProfileRTLibs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const
addProfileRTLibs - When -fprofile-instr-profile is specified, try to pass a suitable profile runtime ...
Definition: ToolChain.cpp:782
clang::driver::ToolChain::getCompilerRTArgString
const char * getCompilerRTArgString(const llvm::opt::ArgList &Args, StringRef Component, FileType Type=ToolChain::FT_Static) const
Definition: ToolChain.cpp:504
clang::driver::ToolChain
ToolChain - Access to tools for a single platform.
Definition: ToolChain.h:91
clang::driver::ToolChain::GetLinkerPath
std::string GetLinkerPath(bool *LinkerIsLLD=nullptr) const
Returns the linker path, respecting the -fuse-ld= argument to determine the linker suffix or name.
Definition: ToolChain.cpp:585
clang::driver::tools::arm::getARMTargetCPU
std::string getARMTargetCPU(StringRef CPU, llvm::StringRef Arch, const llvm::Triple &Triple)
clang::driver::toolchains::OpenBSD::AddCXXStdlibLibArgs
void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const override
AddCXXStdlibLibArgs - Add the system specific linker arguments to use for the given C++ standard libr...
Definition: OpenBSD.cpp:324
clang::driver::toolchains::OpenBSD::IsUnwindTablesDefault
bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override
IsUnwindTablesDefault - Does this tool chain use -funwind-tables by default.
Definition: OpenBSD.cpp:349
clang::driver::Compilation
Compilation - A set of tasks to perform for a single driver invocation.
Definition: Compilation.h:45
clang::driver::tools::arm::getARMArchCPUFromArgs
void getARMArchCPUFromArgs(const llvm::opt::ArgList &Args, llvm::StringRef &Arch, llvm::StringRef &CPU, bool FromAs=false)
clang::driver::ToolChain::FileType
FileType
Definition: ToolChain.h:123
clang::driver::tools::addOpenMPRuntime
bool addOpenMPRuntime(llvm::opt::ArgStringList &CmdArgs, const ToolChain &TC, const llvm::opt::ArgList &Args, bool ForceStaticHostRuntime=false, bool IsOffloadingHost=false, bool GompNeedsRT=false)
Returns true, if an OpenMP runtime has been added.
clang::driver::InputInfo::getFilename
const char * getFilename() const
Definition: InputInfo.h:83
clang::driver::tools::mips::getMipsCPUAndABI
void getMipsCPUAndABI(const llvm::opt::ArgList &Args, const llvm::Triple &Triple, StringRef &CPUName, StringRef &ABIName)
clang::driver::tools::linkSanitizerRuntimeDeps
void linkSanitizerRuntimeDeps(const ToolChain &TC, llvm::opt::ArgStringList &CmdArgs)
CommonArgs.h
clang
Definition: CalledOnceCheck.h:17
clang::driver::Driver
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition: Driver.h:71
clang::driver::tools::addSanitizerRuntimes
bool addSanitizerRuntimes(const ToolChain &TC, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs)
clang::driver::toolchains::OpenBSD::HasNativeLLVMSupport
bool HasNativeLLVMSupport() const override
HasNativeLTOLinker - Check whether the linker and related tools have native LLVM support.
Definition: OpenBSD.cpp:347
clang::driver::tools::linkXRayRuntimeDeps
void linkXRayRuntimeDeps(const ToolChain &TC, llvm::opt::ArgStringList &CmdArgs)
clang::driver::toolchains::OpenBSD::buildLinker
Tool * buildLinker() const override
Definition: OpenBSD.cpp:345
clang::driver::ToolChain::addExternCSystemInclude
static void addExternCSystemInclude(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, const Twine &Path)
Utility function to add a system include directory with extern "C" semantics to CC1 arguments.
Definition: ToolChain.cpp:893
ARM.h
clang::driver::toolchains::OpenBSD::buildAssembler
Tool * buildAssembler() const override
Definition: OpenBSD.cpp:341
clang::driver
Definition: Action.h:31
clang::driver::ToolChain::addSystemInclude
static void addSystemInclude(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, const Twine &Path)
Utility function to add a system include directory to CC1 arguments.
Definition: ToolChain.cpp:878
clang::driver::toolchains::OpenBSD
Definition: OpenBSD.h:53
clang::driver::JobAction
Definition: Action.h:395
clang::driver::tools::sparc::getSparcAsmModeForCPU
const char * getSparcAsmModeForCPU(llvm::StringRef Name, const llvm::Triple &Triple)
clang::SanitizerMask
Definition: Sanitizers.h:30