clang  15.0.0git
Action.cpp
Go to the documentation of this file.
1 //===- Action.cpp - Abstract compilation steps ----------------------------===//
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 "clang/Driver/Action.h"
10 #include "llvm/Support/ErrorHandling.h"
11 #include <cassert>
12 #include <string>
13 
14 using namespace clang;
15 using namespace driver;
16 using namespace llvm::opt;
17 
18 Action::~Action() = default;
19 
21  switch (AC) {
22  case InputClass: return "input";
23  case BindArchClass: return "bind-arch";
24  case OffloadClass:
25  return "offload";
26  case PreprocessJobClass: return "preprocessor";
27  case PrecompileJobClass: return "precompiler";
28  case HeaderModulePrecompileJobClass: return "header-module-precompiler";
29  case ExtractAPIJobClass:
30  return "api-extractor";
31  case AnalyzeJobClass: return "analyzer";
32  case MigrateJobClass: return "migrator";
33  case CompileJobClass: return "compiler";
34  case BackendJobClass: return "backend";
35  case AssembleJobClass: return "assembler";
36  case IfsMergeJobClass: return "interface-stub-merger";
37  case LinkJobClass: return "linker";
38  case LipoJobClass: return "lipo";
39  case DsymutilJobClass: return "dsymutil";
40  case VerifyDebugInfoJobClass: return "verify-debug-info";
41  case VerifyPCHJobClass: return "verify-pch";
42  case OffloadBundlingJobClass:
43  return "clang-offload-bundler";
44  case OffloadUnbundlingJobClass:
45  return "clang-offload-unbundler";
46  case OffloadWrapperJobClass:
47  return "clang-offload-wrapper";
48  case OffloadPackagerJobClass:
49  return "clang-offload-packager";
50  case LinkerWrapperJobClass:
51  return "clang-linker-wrapper";
52  case StaticLibJobClass:
53  return "static-lib-linker";
54  }
55 
56  llvm_unreachable("invalid class");
57 }
58 
59 void Action::propagateDeviceOffloadInfo(OffloadKind OKind, const char *OArch,
60  const ToolChain *OToolChain) {
61  // Offload action set its own kinds on their dependences.
62  if (Kind == OffloadClass)
63  return;
64  // Unbundling actions use the host kinds.
65  if (Kind == OffloadUnbundlingJobClass)
66  return;
67 
68  assert((OffloadingDeviceKind == OKind || OffloadingDeviceKind == OFK_None) &&
69  "Setting device kind to a different device??");
70  assert(!ActiveOffloadKindMask && "Setting a device kind in a host action??");
71  OffloadingDeviceKind = OKind;
72  OffloadingArch = OArch;
73  OffloadingToolChain = OToolChain;
74 
75  for (auto *A : Inputs)
76  A->propagateDeviceOffloadInfo(OffloadingDeviceKind, OArch, OToolChain);
77 }
78 
79 void Action::propagateHostOffloadInfo(unsigned OKinds, const char *OArch) {
80  // Offload action set its own kinds on their dependences.
81  if (Kind == OffloadClass)
82  return;
83 
84  assert(OffloadingDeviceKind == OFK_None &&
85  "Setting a host kind in a device action.");
86  ActiveOffloadKindMask |= OKinds;
87  OffloadingArch = OArch;
88 
89  for (auto *A : Inputs)
90  A->propagateHostOffloadInfo(ActiveOffloadKindMask, OArch);
91 }
92 
94  if (unsigned HK = A->getOffloadingHostActiveKinds())
95  propagateHostOffloadInfo(HK, A->getOffloadingArch());
96  else
97  propagateDeviceOffloadInfo(A->getOffloadingDeviceKind(),
98  A->getOffloadingArch(),
100 }
101 
103  switch (OffloadingDeviceKind) {
104  case OFK_None:
105  break;
106  case OFK_Host:
107  llvm_unreachable("Host kind is not an offloading device kind.");
108  break;
109  case OFK_Cuda:
110  return "device-cuda";
111  case OFK_OpenMP:
112  return "device-openmp";
113  case OFK_HIP:
114  return "device-hip";
115 
116  // TODO: Add other programming models here.
117  }
118 
119  if (!ActiveOffloadKindMask)
120  return {};
121 
122  std::string Res("host");
123  assert(!((ActiveOffloadKindMask & OFK_Cuda) &&
124  (ActiveOffloadKindMask & OFK_HIP)) &&
125  "Cannot offload CUDA and HIP at the same time");
126  if (ActiveOffloadKindMask & OFK_Cuda)
127  Res += "-cuda";
128  if (ActiveOffloadKindMask & OFK_HIP)
129  Res += "-hip";
130  if (ActiveOffloadKindMask & OFK_OpenMP)
131  Res += "-openmp";
132 
133  // TODO: Add other programming models here.
134 
135  return Res;
136 }
137 
138 /// Return a string that can be used as prefix in order to generate unique files
139 /// for each offloading kind.
142  StringRef NormalizedTriple,
143  bool CreatePrefixForHost) {
144  // Don't generate prefix for host actions unless required.
145  if (!CreatePrefixForHost && (Kind == OFK_None || Kind == OFK_Host))
146  return {};
147 
148  std::string Res("-");
149  Res += GetOffloadKindName(Kind);
150  Res += "-";
151  Res += NormalizedTriple;
152  return Res;
153 }
154 
155 /// Return a string with the offload kind name. If that is not defined, we
156 /// assume 'host'.
158  switch (Kind) {
159  case OFK_None:
160  case OFK_Host:
161  return "host";
162  case OFK_Cuda:
163  return "cuda";
164  case OFK_OpenMP:
165  return "openmp";
166  case OFK_HIP:
167  return "hip";
168 
169  // TODO: Add other programming models here.
170  }
171 
172  llvm_unreachable("invalid offload kind");
173 }
174 
175 void InputAction::anchor() {}
176 
177 InputAction::InputAction(const Arg &_Input, types::ID _Type, StringRef _Id)
178  : Action(InputClass, _Type), Input(_Input), Id(_Id.str()) {}
179 
180 void BindArchAction::anchor() {}
181 
182 BindArchAction::BindArchAction(Action *Input, StringRef ArchName)
183  : Action(BindArchClass, Input), ArchName(ArchName) {}
184 
185 void OffloadAction::anchor() {}
186 
188  : Action(OffloadClass, HDep.getAction()), HostTC(HDep.getToolChain()) {
189  OffloadingArch = HDep.getBoundArch();
192  HDep.getBoundArch());
193 }
194 
196  : Action(OffloadClass, DDeps.getActions(), Ty),
197  DevToolChains(DDeps.getToolChains()) {
198  auto &OKinds = DDeps.getOffloadKinds();
199  auto &BArchs = DDeps.getBoundArchs();
200  auto &OTCs = DDeps.getToolChains();
201 
202  // If all inputs agree on the same kind, use it also for this action.
203  if (llvm::all_of(OKinds, [&](OffloadKind K) { return K == OKinds.front(); }))
204  OffloadingDeviceKind = OKinds.front();
205 
206  // If we have a single dependency, inherit the architecture from it.
207  if (OKinds.size() == 1)
208  OffloadingArch = BArchs.front();
209 
210  // Propagate info to the dependencies.
211  for (unsigned i = 0, e = getInputs().size(); i != e; ++i)
212  getInputs()[i]->propagateDeviceOffloadInfo(OKinds[i], BArchs[i], OTCs[i]);
213 }
214 
216  const DeviceDependences &DDeps)
217  : Action(OffloadClass, HDep.getAction()), HostTC(HDep.getToolChain()),
218  DevToolChains(DDeps.getToolChains()) {
219  // We use the kinds of the host dependence for this action.
220  OffloadingArch = HDep.getBoundArch();
223  HDep.getBoundArch());
224 
225  // Add device inputs and propagate info to the device actions. Do work only if
226  // we have dependencies.
227  for (unsigned i = 0, e = DDeps.getActions().size(); i != e; ++i)
228  if (auto *A = DDeps.getActions()[i]) {
229  getInputs().push_back(A);
230  A->propagateDeviceOffloadInfo(DDeps.getOffloadKinds()[i],
231  DDeps.getBoundArchs()[i],
232  DDeps.getToolChains()[i]);
233  }
234 }
235 
237  if (!HostTC)
238  return;
239  assert(!getInputs().empty() && "No dependencies for offload action??");
240  auto *A = getInputs().front();
241  Work(A, HostTC, A->getOffloadingArch());
242 }
243 
245  const OffloadActionWorkTy &Work) const {
246  auto I = getInputs().begin();
247  auto E = getInputs().end();
248  if (I == E)
249  return;
250 
251  // We expect to have the same number of input dependences and device tool
252  // chains, except if we also have a host dependence. In that case we have one
253  // more dependence than we have device tool chains.
254  assert(getInputs().size() == DevToolChains.size() + (HostTC ? 1 : 0) &&
255  "Sizes of action dependences and toolchains are not consistent!");
256 
257  // Skip host action
258  if (HostTC)
259  ++I;
260 
261  auto TI = DevToolChains.begin();
262  for (; I != E; ++I, ++TI)
263  Work(*I, *TI, (*I)->getOffloadingArch());
264 }
265 
267  doOnHostDependence(Work);
269 }
270 
271 void OffloadAction::doOnEachDependence(bool IsHostDependence,
272  const OffloadActionWorkTy &Work) const {
273  if (IsHostDependence)
274  doOnHostDependence(Work);
275  else
277 }
278 
279 bool OffloadAction::hasHostDependence() const { return HostTC != nullptr; }
280 
282  assert(hasHostDependence() && "Host dependence does not exist!");
283  assert(!getInputs().empty() && "No dependencies for offload action??");
284  return HostTC ? getInputs().front() : nullptr;
285 }
286 
288  bool DoNotConsiderHostActions) const {
289  if (DoNotConsiderHostActions)
290  return getInputs().size() == (HostTC ? 2 : 1);
291  return !HostTC && getInputs().size() == 1;
292 }
293 
294 Action *
295 OffloadAction::getSingleDeviceDependence(bool DoNotConsiderHostActions) const {
296  assert(hasSingleDeviceDependence(DoNotConsiderHostActions) &&
297  "Single device dependence does not exist!");
298  // The previous assert ensures the number of entries in getInputs() is
299  // consistent with what we are doing here.
300  return HostTC ? getInputs()[1] : getInputs().front();
301 }
302 
304  const char *BoundArch,
305  OffloadKind OKind) {
306  DeviceActions.push_back(&A);
307  DeviceToolChains.push_back(&TC);
308  DeviceBoundArchs.push_back(BoundArch);
309  DeviceOffloadKinds.push_back(OKind);
310 }
311 
313  const char *BoundArch,
314  const DeviceDependences &DDeps)
315  : HostAction(A), HostToolChain(TC), HostBoundArch(BoundArch) {
316  for (auto K : DDeps.getOffloadKinds())
317  HostOffloadKinds |= K;
318 }
319 
320 void JobAction::anchor() {}
321 
323  : Action(Kind, Input, Type) {}
324 
326  : Action(Kind, Inputs, Type) {}
327 
328 void PreprocessJobAction::anchor() {}
329 
331  : JobAction(PreprocessJobClass, Input, OutputType) {}
332 
333 void PrecompileJobAction::anchor() {}
334 
336  : JobAction(PrecompileJobClass, Input, OutputType) {}
337 
339  types::ID OutputType)
340  : JobAction(Kind, Input, OutputType) {
341  assert(isa<PrecompileJobAction>((Action*)this) && "invalid action kind");
342 }
343 
344 void HeaderModulePrecompileJobAction::anchor() {}
345 
347  Action *Input, types::ID OutputType, const char *ModuleName)
348  : PrecompileJobAction(HeaderModulePrecompileJobClass, Input, OutputType),
349  ModuleName(ModuleName) {}
350 
351 void ExtractAPIJobAction::anchor() {}
352 
354  : JobAction(ExtractAPIJobClass, Inputs, OutputType) {}
355 
356 void AnalyzeJobAction::anchor() {}
357 
359  : JobAction(AnalyzeJobClass, Input, OutputType) {}
360 
361 void MigrateJobAction::anchor() {}
362 
364  : JobAction(MigrateJobClass, Input, OutputType) {}
365 
366 void CompileJobAction::anchor() {}
367 
369  : JobAction(CompileJobClass, Input, OutputType) {}
370 
371 void BackendJobAction::anchor() {}
372 
374  : JobAction(BackendJobClass, Input, OutputType) {}
375 
376 void AssembleJobAction::anchor() {}
377 
379  : JobAction(AssembleJobClass, Input, OutputType) {}
380 
381 void IfsMergeJobAction::anchor() {}
382 
384  : JobAction(IfsMergeJobClass, Inputs, Type) {}
385 
386 void LinkJobAction::anchor() {}
387 
389  : JobAction(LinkJobClass, Inputs, Type) {}
390 
391 void LipoJobAction::anchor() {}
392 
394  : JobAction(LipoJobClass, Inputs, Type) {}
395 
396 void DsymutilJobAction::anchor() {}
397 
399  : JobAction(DsymutilJobClass, Inputs, Type) {}
400 
401 void VerifyJobAction::anchor() {}
402 
404  types::ID Type)
405  : JobAction(Kind, Input, Type) {
406  assert((Kind == VerifyDebugInfoJobClass || Kind == VerifyPCHJobClass) &&
407  "ActionClass is not a valid VerifyJobAction");
408 }
409 
410 void VerifyDebugInfoJobAction::anchor() {}
411 
413  types::ID Type)
414  : VerifyJobAction(VerifyDebugInfoJobClass, Input, Type) {}
415 
416 void VerifyPCHJobAction::anchor() {}
417 
419  : VerifyJobAction(VerifyPCHJobClass, Input, Type) {}
420 
421 void OffloadBundlingJobAction::anchor() {}
422 
424  : JobAction(OffloadBundlingJobClass, Inputs, Inputs.back()->getType()) {}
425 
426 void OffloadUnbundlingJobAction::anchor() {}
427 
429  : JobAction(OffloadUnbundlingJobClass, Input, Input->getType()) {}
430 
431 void OffloadWrapperJobAction::anchor() {}
432 
434  types::ID Type)
435  : JobAction(OffloadWrapperJobClass, Inputs, Type) {}
436 
437 void OffloadPackagerJobAction::anchor() {}
438 
440  types::ID Type)
441  : JobAction(OffloadPackagerJobClass, Inputs, Type) {}
442 
443 void LinkerWrapperJobAction::anchor() {}
444 
446  types::ID Type)
447  : JobAction(LinkerWrapperJobClass, Inputs, Type) {}
448 
449 void StaticLibJobAction::anchor() {}
450 
452  : JobAction(StaticLibJobClass, Inputs, Type) {}
clang::driver::Action::ActiveOffloadKindMask
unsigned ActiveOffloadKindMask
Offload information.
Definition: Action.h:124
clang::driver::Action::getOffloadingArch
const char * getOffloadingArch() const
Definition: Action.h:212
clang::driver::OffloadAction::HostDependence::getBoundArch
const char * getBoundArch() const
Definition: Action.h:341
clang::driver::Action::getOffloadingToolChain
const ToolChain * getOffloadingToolChain() const
Definition: Action.h:213
clang::driver::Action::size
size_type size() const
Definition: Action.h:154
string
string(SUBSTRING ${CMAKE_CURRENT_BINARY_DIR} 0 ${PATH_LIB_START} PATH_HEAD) string(SUBSTRING $
Definition: CMakeLists.txt:22
clang::driver::Action::getInputs
ActionList & getInputs()
Definition: Action.h:151
llvm::SmallVector< Action *, 3 >
clang::driver::Action::ActionClass
ActionClass
Definition: Action.h:55
clang::driver::Action::OffloadingArch
const char * OffloadingArch
The Offloading architecture associated with this action.
Definition: Action.h:130
clang::driver::Action
Action - Represent an abstract compilation step to perform.
Definition: Action.h:47
clang::driver::OffloadAction::OffloadAction
OffloadAction(const HostDependence &HDep)
Definition: Action.cpp:187
clang::driver::OffloadAction::OffloadActionWorkTy
llvm::function_ref< void(Action *, const ToolChain *, const char *)> OffloadActionWorkTy
Definition: Action.h:346
clang::driver::OffloadAction::HostDependence::HostDependence
HostDependence(Action &A, const ToolChain &TC, const char *BoundArch, const unsigned OffloadKinds)
Definition: Action.h:330
clang::driver::Action::propagateDeviceOffloadInfo
void propagateDeviceOffloadInfo(OffloadKind OKind, const char *OArch, const ToolChain *OToolChain)
Set the device offload info of this action and propagate it to its dependences.
Definition: Action.cpp:59
clang::driver::InputAction::InputAction
InputAction(const llvm::opt::Arg &Input, types::ID Type, StringRef Id=StringRef())
Definition: Action.cpp:177
clang::driver::PrecompileJobAction::PrecompileJobAction
PrecompileJobAction(ActionClass Kind, Action *Input, types::ID OutputType)
Definition: Action.cpp:338
clang::driver::OffloadAction::doOnHostDependence
void doOnHostDependence(const OffloadActionWorkTy &Work) const
Execute the work specified in Work on the host dependence.
Definition: Action.cpp:236
clang::driver::Action::getOffloadingHostActiveKinds
unsigned getOffloadingHostActiveKinds() const
Definition: Action.h:207
clang::driver::Action::~Action
virtual ~Action()
clang::driver::Action::GetOffloadKindName
static StringRef GetOffloadKindName(OffloadKind Kind)
Return a string containing a offload kind name.
Definition: Action.cpp:157
clang::driver::OffloadAction::doOnEachDependence
void doOnEachDependence(const OffloadActionWorkTy &Work) const
Execute the work specified in Work on each dependence.
Definition: Action.cpp:266
clang::Type
The base class of the type hierarchy.
Definition: Type.h:1556
clang::driver::BindArchAction::BindArchAction
BindArchAction(Action *Input, StringRef ArchName)
Definition: Action.cpp:182
Action.h
clang::driver::OffloadAction::HostDependence::getOffloadKinds
unsigned getOffloadKinds() const
Definition: Action.h:342
clang::driver::VerifyJobAction::VerifyJobAction
VerifyJobAction(ActionClass Kind, Action *Input, types::ID Type)
Definition: Action.cpp:403
clang::driver::OffloadAction::HostDependence
Type used to communicate host actions.
Definition: Action.h:316
clang::driver::CompileJobAction::CompileJobAction
CompileJobAction(Action *Input, types::ID OutputType)
Definition: Action.cpp:368
clang::driver::IfsMergeJobAction::IfsMergeJobAction
IfsMergeJobAction(ActionList &Inputs, types::ID Type)
Definition: Action.cpp:383
clang::driver::LinkJobAction::LinkJobAction
LinkJobAction(ActionList &Inputs, types::ID Type)
Definition: Action.cpp:388
Id
int Id
Definition: ASTDiff.cpp:191
llvm::opt
Definition: DiagnosticOptions.h:19
clang::driver::OffloadBundlingJobAction::OffloadBundlingJobAction
OffloadBundlingJobAction(ActionList &Inputs)
Definition: Action.cpp:423
clang::driver::PrecompileJobAction
Definition: Action.h:420
clang::driver::OffloadAction::DeviceDependences::getActions
const ActionList & getActions() const
Get each of the individual arrays.
Definition: Action.h:306
clang::driver::OffloadAction::doOnEachDeviceDependence
void doOnEachDeviceDependence(const OffloadActionWorkTy &Work) const
Execute the work specified in Work on each device dependence.
Definition: Action.cpp:244
clang::driver::OffloadAction::hasHostDependence
bool hasHostDependence() const
Return true if the action has a host dependence.
Definition: Action.cpp:279
clang::driver::OffloadWrapperJobAction::OffloadWrapperJobAction
OffloadWrapperJobAction(ActionList &Inputs, types::ID Type)
Definition: Action.cpp:433
clang::driver::Action::OffloadingDeviceKind
OffloadKind OffloadingDeviceKind
Offloading kind of the device.
Definition: Action.h:127
clang::driver::Action::GetOffloadingFileNamePrefix
static std::string GetOffloadingFileNamePrefix(OffloadKind Kind, StringRef NormalizedTriple, bool CreatePrefixForHost=false)
Return a string that can be used as prefix in order to generate unique files for each offloading kind...
Definition: Action.cpp:141
clang::driver::AssembleJobAction::AssembleJobAction
AssembleJobAction(Action *Input, types::ID OutputType)
Definition: Action.cpp:378
clang::driver::Action::getOffloadingKindPrefix
std::string getOffloadingKindPrefix() const
Return a string containing the offload kind of the action.
Definition: Action.cpp:102
clang::driver::OffloadAction::DeviceDependences::add
void add(Action &A, const ToolChain &TC, const char *BoundArch, OffloadKind OKind)
Add a action along with the associated toolchain, bound arch, and offload kind.
Definition: Action.cpp:303
clang::driver::HeaderModulePrecompileJobAction::HeaderModulePrecompileJobAction
HeaderModulePrecompileJobAction(Action *Input, types::ID OutputType, const char *ModuleName)
Definition: Action.cpp:346
clang::driver::Action::propagateHostOffloadInfo
void propagateHostOffloadInfo(unsigned OKinds, const char *OArch)
Append the host offload info of this action and propagate it to its dependences.
Definition: Action.cpp:79
clang::driver::StaticLibJobAction::StaticLibJobAction
StaticLibJobAction(ActionList &Inputs, types::ID Type)
Definition: Action.cpp:451
clang::driver::AnalyzeJobAction::AnalyzeJobAction
AnalyzeJobAction(Action *Input, types::ID OutputType)
Definition: Action.cpp:358
clang::driver::Action::propagateOffloadInfo
void propagateOffloadInfo(const Action *A)
Set the offload info of this action to be the same as the provided action, and propagate it to its de...
Definition: Action.cpp:93
clang::driver::LinkerWrapperJobAction::LinkerWrapperJobAction
LinkerWrapperJobAction(ActionList &Inputs, types::ID Type)
Definition: Action.cpp:445
clang::driver::LipoJobAction::LipoJobAction
LipoJobAction(ActionList &Inputs, types::ID Type)
Definition: Action.cpp:393
clang::driver::OffloadAction::DeviceDependences::getToolChains
const ToolChainList & getToolChains() const
Definition: Action.h:307
clang::driver::PreprocessJobAction::PreprocessJobAction
PreprocessJobAction(Action *Input, types::ID OutputType)
Definition: Action.cpp:330
clang::driver::VerifyJobAction
Definition: Action.h:567
clang::driver::OffloadAction::getSingleDeviceDependence
Action * getSingleDeviceDependence(bool DoNotConsiderHostActions=false) const
Return the single device dependence of this action.
Definition: Action.cpp:295
clang::driver::ToolChain
ToolChain - Access to tools for a single platform.
Definition: ToolChain.h:91
clang::driver::Action::getClassName
const char * getClassName() const
Definition: Action.h:146
clang::driver::JobAction::JobAction
JobAction(ActionClass Kind, Action *Input, types::ID Type)
Definition: Action.cpp:322
clang::driver::Action::getOffloadingDeviceKind
OffloadKind getOffloadingDeviceKind() const
Definition: Action.h:211
clang::driver::OffloadPackagerJobAction::OffloadPackagerJobAction
OffloadPackagerJobAction(ActionList &Inputs, types::ID Type)
Definition: Action.cpp:439
clang::driver::types::ID
ID
Definition: Types.h:23
clang::driver::OffloadAction::DeviceDependences::getBoundArchs
const BoundArchList & getBoundArchs() const
Definition: Action.h:308
clang::ObjCPropertyAttribute::Kind
Kind
Definition: DeclObjCCommon.h:22
clang::driver::VerifyDebugInfoJobAction::VerifyDebugInfoJobAction
VerifyDebugInfoJobAction(Action *Input, types::ID Type)
Definition: Action.cpp:412
clang::driver::ExtractAPIJobAction::ExtractAPIJobAction
ExtractAPIJobAction(Action *Input, types::ID OutputType)
Definition: Action.cpp:353
clang::driver::OffloadUnbundlingJobAction::OffloadUnbundlingJobAction
OffloadUnbundlingJobAction(Action *Input)
Definition: Action.cpp:428
clang
Definition: CalledOnceCheck.h:17
clang::driver::Action::VerifyDebugInfoJobClass
@ VerifyDebugInfoJobClass
Definition: Action.h:72
clang::driver::OffloadAction::HostDependence::getAction
Action * getAction() const
Definition: Action.h:339
clang::driver::VerifyPCHJobAction::VerifyPCHJobAction
VerifyPCHJobAction(Action *Input, types::ID Type)
Definition: Action.cpp:418
clang::driver::OffloadAction::hasSingleDeviceDependence
bool hasSingleDeviceDependence(bool DoNotConsiderHostActions=false) const
Return true if the action has a single device dependence.
Definition: Action.cpp:287
clang::driver::Action::OffloadKind
OffloadKind
Definition: Action.h:88
clang::driver::DsymutilJobAction::DsymutilJobAction
DsymutilJobAction(ActionList &Inputs, types::ID Type)
Definition: Action.cpp:398
clang::driver::JobAction
Definition: Action.h:395
clang::driver::MigrateJobAction::MigrateJobAction
MigrateJobAction(Action *Input, types::ID OutputType)
Definition: Action.cpp:363
clang::driver::BackendJobAction::BackendJobAction
BackendJobAction(Action *Input, types::ID OutputType)
Definition: Action.cpp:373
clang::driver::OffloadAction::DeviceDependences::getOffloadKinds
const OffloadKindList & getOffloadKinds() const
Definition: Action.h:309
clang::driver::OffloadAction::DeviceDependences
Type used to communicate device actions.
Definition: Action.h:275
clang::driver::Action::VerifyPCHJobClass
@ VerifyPCHJobClass
Definition: Action.h:73
clang::driver::OffloadAction::getHostDependence
Action * getHostDependence() const
Return the host dependence of this action.
Definition: Action.cpp:281