Nick Lewycky | 6da9077 | 2010-12-31 17:31:54 +0000 | [diff] [blame] | 1 | //===--- Action.cpp - Abstract compilation steps --------------------------===// |
Daniel Dunbar | f479c12 | 2009-03-12 18:40:18 +0000 | [diff] [blame] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #include "clang/Driver/Action.h" |
Samuel Antao | d06239d | 2016-07-15 23:13:27 +0000 | [diff] [blame] | 11 | #include "clang/Driver/ToolChain.h" |
Justin Lebar | 29bfa89 | 2016-01-12 22:23:04 +0000 | [diff] [blame] | 12 | #include "llvm/ADT/StringSwitch.h" |
David Blaikie | 7900020 | 2011-09-23 05:57:42 +0000 | [diff] [blame] | 13 | #include "llvm/Support/ErrorHandling.h" |
Justin Lebar | 7bf7798 | 2016-01-11 23:27:13 +0000 | [diff] [blame] | 14 | #include "llvm/Support/Regex.h" |
Daniel Dunbar | f479c12 | 2009-03-12 18:40:18 +0000 | [diff] [blame] | 15 | #include <cassert> |
| 16 | using namespace clang::driver; |
Reid Kleckner | 898229a | 2013-06-14 17:17:23 +0000 | [diff] [blame] | 17 | using namespace llvm::opt; |
Daniel Dunbar | f479c12 | 2009-03-12 18:40:18 +0000 | [diff] [blame] | 18 | |
Justin Lebar | 4109461 | 2016-01-11 23:07:27 +0000 | [diff] [blame] | 19 | Action::~Action() {} |
Daniel Dunbar | 80665fb | 2009-03-13 12:17:08 +0000 | [diff] [blame] | 20 | |
| 21 | const char *Action::getClassName(ActionClass AC) { |
| 22 | switch (AC) { |
| 23 | case InputClass: return "input"; |
| 24 | case BindArchClass: return "bind-arch"; |
Samuel Antao | d06239d | 2016-07-15 23:13:27 +0000 | [diff] [blame] | 25 | case OffloadClass: |
| 26 | return "offload"; |
Daniel Dunbar | 7326ad5 | 2009-03-13 17:52:07 +0000 | [diff] [blame] | 27 | case PreprocessJobClass: return "preprocessor"; |
| 28 | case PrecompileJobClass: return "precompiler"; |
| 29 | case AnalyzeJobClass: return "analyzer"; |
Ted Kremenek | f7639e1 | 2012-03-06 20:06:33 +0000 | [diff] [blame] | 30 | case MigrateJobClass: return "migrator"; |
Daniel Dunbar | 7326ad5 | 2009-03-13 17:52:07 +0000 | [diff] [blame] | 31 | case CompileJobClass: return "compiler"; |
Bob Wilson | 23a55f1 | 2014-12-21 07:00:00 +0000 | [diff] [blame] | 32 | case BackendJobClass: return "backend"; |
Daniel Dunbar | 7326ad5 | 2009-03-13 17:52:07 +0000 | [diff] [blame] | 33 | case AssembleJobClass: return "assembler"; |
| 34 | case LinkJobClass: return "linker"; |
Daniel Dunbar | 80665fb | 2009-03-13 12:17:08 +0000 | [diff] [blame] | 35 | case LipoJobClass: return "lipo"; |
Daniel Dunbar | 8829962 | 2010-06-04 18:28:36 +0000 | [diff] [blame] | 36 | case DsymutilJobClass: return "dsymutil"; |
Ben Langmuir | 9b9a8d3 | 2014-02-06 18:53:25 +0000 | [diff] [blame] | 37 | case VerifyDebugInfoJobClass: return "verify-debug-info"; |
| 38 | case VerifyPCHJobClass: return "verify-pch"; |
Samuel Antao | 69d6f31 | 2016-10-27 17:50:43 +0000 | [diff] [blame] | 39 | case OffloadBundlingJobClass: |
| 40 | return "clang-offload-bundler"; |
Samuel Antao | fab4f37 | 2016-10-27 18:00:51 +0000 | [diff] [blame^] | 41 | case OffloadUnbundlingJobClass: |
| 42 | return "clang-offload-unbundler"; |
Daniel Dunbar | 80665fb | 2009-03-13 12:17:08 +0000 | [diff] [blame] | 43 | } |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 44 | |
David Blaikie | 83d382b | 2011-09-23 05:06:16 +0000 | [diff] [blame] | 45 | llvm_unreachable("invalid class"); |
Daniel Dunbar | 80665fb | 2009-03-13 12:17:08 +0000 | [diff] [blame] | 46 | } |
Daniel Dunbar | 3f261ff | 2009-03-13 23:08:03 +0000 | [diff] [blame] | 47 | |
Samuel Antao | d06239d | 2016-07-15 23:13:27 +0000 | [diff] [blame] | 48 | void Action::propagateDeviceOffloadInfo(OffloadKind OKind, const char *OArch) { |
| 49 | // Offload action set its own kinds on their dependences. |
| 50 | if (Kind == OffloadClass) |
| 51 | return; |
Samuel Antao | fab4f37 | 2016-10-27 18:00:51 +0000 | [diff] [blame^] | 52 | // Unbundling actions use the host kinds. |
| 53 | if (Kind == OffloadUnbundlingJobClass) |
| 54 | return; |
Samuel Antao | d06239d | 2016-07-15 23:13:27 +0000 | [diff] [blame] | 55 | |
| 56 | assert((OffloadingDeviceKind == OKind || OffloadingDeviceKind == OFK_None) && |
| 57 | "Setting device kind to a different device??"); |
| 58 | assert(!ActiveOffloadKindMask && "Setting a device kind in a host action??"); |
| 59 | OffloadingDeviceKind = OKind; |
| 60 | OffloadingArch = OArch; |
| 61 | |
| 62 | for (auto *A : Inputs) |
| 63 | A->propagateDeviceOffloadInfo(OffloadingDeviceKind, OArch); |
| 64 | } |
| 65 | |
| 66 | void Action::propagateHostOffloadInfo(unsigned OKinds, const char *OArch) { |
| 67 | // Offload action set its own kinds on their dependences. |
| 68 | if (Kind == OffloadClass) |
| 69 | return; |
| 70 | |
| 71 | assert(OffloadingDeviceKind == OFK_None && |
| 72 | "Setting a host kind in a device action."); |
| 73 | ActiveOffloadKindMask |= OKinds; |
| 74 | OffloadingArch = OArch; |
| 75 | |
| 76 | for (auto *A : Inputs) |
| 77 | A->propagateHostOffloadInfo(ActiveOffloadKindMask, OArch); |
| 78 | } |
| 79 | |
| 80 | void Action::propagateOffloadInfo(const Action *A) { |
| 81 | if (unsigned HK = A->getOffloadingHostActiveKinds()) |
| 82 | propagateHostOffloadInfo(HK, A->getOffloadingArch()); |
| 83 | else |
| 84 | propagateDeviceOffloadInfo(A->getOffloadingDeviceKind(), |
| 85 | A->getOffloadingArch()); |
| 86 | } |
| 87 | |
| 88 | std::string Action::getOffloadingKindPrefix() const { |
| 89 | switch (OffloadingDeviceKind) { |
| 90 | case OFK_None: |
| 91 | break; |
| 92 | case OFK_Host: |
| 93 | llvm_unreachable("Host kind is not an offloading device kind."); |
| 94 | break; |
| 95 | case OFK_Cuda: |
| 96 | return "device-cuda"; |
Samuel Antao | 39f9da2 | 2016-10-27 16:38:05 +0000 | [diff] [blame] | 97 | case OFK_OpenMP: |
| 98 | return "device-openmp"; |
Samuel Antao | d06239d | 2016-07-15 23:13:27 +0000 | [diff] [blame] | 99 | |
| 100 | // TODO: Add other programming models here. |
| 101 | } |
| 102 | |
| 103 | if (!ActiveOffloadKindMask) |
| 104 | return ""; |
| 105 | |
| 106 | std::string Res("host"); |
| 107 | if (ActiveOffloadKindMask & OFK_Cuda) |
| 108 | Res += "-cuda"; |
Samuel Antao | 39f9da2 | 2016-10-27 16:38:05 +0000 | [diff] [blame] | 109 | if (ActiveOffloadKindMask & OFK_OpenMP) |
| 110 | Res += "-openmp"; |
Samuel Antao | d06239d | 2016-07-15 23:13:27 +0000 | [diff] [blame] | 111 | |
| 112 | // TODO: Add other programming models here. |
| 113 | |
| 114 | return Res; |
| 115 | } |
| 116 | |
| 117 | std::string |
Samuel Antao | 2fd3213 | 2016-07-15 23:51:21 +0000 | [diff] [blame] | 118 | Action::getOffloadingFileNamePrefix(llvm::StringRef NormalizedTriple) const { |
Samuel Antao | d06239d | 2016-07-15 23:13:27 +0000 | [diff] [blame] | 119 | // A file prefix is only generated for device actions and consists of the |
| 120 | // offload kind and triple. |
| 121 | if (!OffloadingDeviceKind) |
| 122 | return ""; |
| 123 | |
| 124 | std::string Res("-"); |
| 125 | Res += getOffloadingKindPrefix(); |
| 126 | Res += "-"; |
| 127 | Res += NormalizedTriple; |
| 128 | return Res; |
| 129 | } |
| 130 | |
David Blaikie | 68e081d | 2011-12-20 02:48:34 +0000 | [diff] [blame] | 131 | void InputAction::anchor() {} |
| 132 | |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 133 | InputAction::InputAction(const Arg &_Input, types::ID _Type) |
Daniel Dunbar | 3f261ff | 2009-03-13 23:08:03 +0000 | [diff] [blame] | 134 | : Action(InputClass, _Type), Input(_Input) { |
| 135 | } |
| 136 | |
David Blaikie | 68e081d | 2011-12-20 02:48:34 +0000 | [diff] [blame] | 137 | void BindArchAction::anchor() {} |
| 138 | |
Mehdi Amini | 087f1fb | 2016-10-07 22:03:03 +0000 | [diff] [blame] | 139 | BindArchAction::BindArchAction(Action *Input, llvm::StringRef ArchName) |
| 140 | : Action(BindArchClass, Input), ArchName(ArchName) {} |
Daniel Dunbar | 3f261ff | 2009-03-13 23:08:03 +0000 | [diff] [blame] | 141 | |
Samuel Antao | d06239d | 2016-07-15 23:13:27 +0000 | [diff] [blame] | 142 | void OffloadAction::anchor() {} |
Artem Belevich | 0ff05cd | 2015-07-13 23:27:56 +0000 | [diff] [blame] | 143 | |
Samuel Antao | d06239d | 2016-07-15 23:13:27 +0000 | [diff] [blame] | 144 | OffloadAction::OffloadAction(const HostDependence &HDep) |
| 145 | : Action(OffloadClass, HDep.getAction()), HostTC(HDep.getToolChain()) { |
| 146 | OffloadingArch = HDep.getBoundArch(); |
| 147 | ActiveOffloadKindMask = HDep.getOffloadKinds(); |
| 148 | HDep.getAction()->propagateHostOffloadInfo(HDep.getOffloadKinds(), |
| 149 | HDep.getBoundArch()); |
Eric Christopher | 2a7248f | 2016-07-16 00:58:34 +0000 | [diff] [blame] | 150 | } |
Artem Belevich | 0ff05cd | 2015-07-13 23:27:56 +0000 | [diff] [blame] | 151 | |
Samuel Antao | d06239d | 2016-07-15 23:13:27 +0000 | [diff] [blame] | 152 | OffloadAction::OffloadAction(const DeviceDependences &DDeps, types::ID Ty) |
| 153 | : Action(OffloadClass, DDeps.getActions(), Ty), |
| 154 | DevToolChains(DDeps.getToolChains()) { |
| 155 | auto &OKinds = DDeps.getOffloadKinds(); |
| 156 | auto &BArchs = DDeps.getBoundArchs(); |
Artem Belevich | 0ff05cd | 2015-07-13 23:27:56 +0000 | [diff] [blame] | 157 | |
Samuel Antao | d06239d | 2016-07-15 23:13:27 +0000 | [diff] [blame] | 158 | // If all inputs agree on the same kind, use it also for this action. |
| 159 | if (llvm::all_of(OKinds, [&](OffloadKind K) { return K == OKinds.front(); })) |
| 160 | OffloadingDeviceKind = OKinds.front(); |
| 161 | |
| 162 | // If we have a single dependency, inherit the architecture from it. |
| 163 | if (OKinds.size() == 1) |
| 164 | OffloadingArch = BArchs.front(); |
| 165 | |
| 166 | // Propagate info to the dependencies. |
| 167 | for (unsigned i = 0, e = getInputs().size(); i != e; ++i) |
| 168 | getInputs()[i]->propagateDeviceOffloadInfo(OKinds[i], BArchs[i]); |
| 169 | } |
| 170 | |
| 171 | OffloadAction::OffloadAction(const HostDependence &HDep, |
| 172 | const DeviceDependences &DDeps) |
| 173 | : Action(OffloadClass, HDep.getAction()), HostTC(HDep.getToolChain()), |
| 174 | DevToolChains(DDeps.getToolChains()) { |
| 175 | // We use the kinds of the host dependence for this action. |
| 176 | OffloadingArch = HDep.getBoundArch(); |
| 177 | ActiveOffloadKindMask = HDep.getOffloadKinds(); |
| 178 | HDep.getAction()->propagateHostOffloadInfo(HDep.getOffloadKinds(), |
| 179 | HDep.getBoundArch()); |
| 180 | |
| 181 | // Add device inputs and propagate info to the device actions. Do work only if |
| 182 | // we have dependencies. |
| 183 | for (unsigned i = 0, e = DDeps.getActions().size(); i != e; ++i) |
| 184 | if (auto *A = DDeps.getActions()[i]) { |
| 185 | getInputs().push_back(A); |
| 186 | A->propagateDeviceOffloadInfo(DDeps.getOffloadKinds()[i], |
| 187 | DDeps.getBoundArchs()[i]); |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | void OffloadAction::doOnHostDependence(const OffloadActionWorkTy &Work) const { |
| 192 | if (!HostTC) |
| 193 | return; |
| 194 | assert(!getInputs().empty() && "No dependencies for offload action??"); |
| 195 | auto *A = getInputs().front(); |
| 196 | Work(A, HostTC, A->getOffloadingArch()); |
| 197 | } |
| 198 | |
| 199 | void OffloadAction::doOnEachDeviceDependence( |
| 200 | const OffloadActionWorkTy &Work) const { |
| 201 | auto I = getInputs().begin(); |
| 202 | auto E = getInputs().end(); |
| 203 | if (I == E) |
| 204 | return; |
| 205 | |
| 206 | // We expect to have the same number of input dependences and device tool |
| 207 | // chains, except if we also have a host dependence. In that case we have one |
| 208 | // more dependence than we have device tool chains. |
| 209 | assert(getInputs().size() == DevToolChains.size() + (HostTC ? 1 : 0) && |
| 210 | "Sizes of action dependences and toolchains are not consistent!"); |
| 211 | |
| 212 | // Skip host action |
| 213 | if (HostTC) |
| 214 | ++I; |
| 215 | |
| 216 | auto TI = DevToolChains.begin(); |
| 217 | for (; I != E; ++I, ++TI) |
| 218 | Work(*I, *TI, (*I)->getOffloadingArch()); |
| 219 | } |
| 220 | |
| 221 | void OffloadAction::doOnEachDependence(const OffloadActionWorkTy &Work) const { |
| 222 | doOnHostDependence(Work); |
| 223 | doOnEachDeviceDependence(Work); |
| 224 | } |
| 225 | |
| 226 | void OffloadAction::doOnEachDependence(bool IsHostDependence, |
| 227 | const OffloadActionWorkTy &Work) const { |
| 228 | if (IsHostDependence) |
| 229 | doOnHostDependence(Work); |
| 230 | else |
| 231 | doOnEachDeviceDependence(Work); |
| 232 | } |
| 233 | |
| 234 | bool OffloadAction::hasHostDependence() const { return HostTC != nullptr; } |
| 235 | |
| 236 | Action *OffloadAction::getHostDependence() const { |
| 237 | assert(hasHostDependence() && "Host dependence does not exist!"); |
| 238 | assert(!getInputs().empty() && "No dependencies for offload action??"); |
| 239 | return HostTC ? getInputs().front() : nullptr; |
| 240 | } |
| 241 | |
| 242 | bool OffloadAction::hasSingleDeviceDependence( |
| 243 | bool DoNotConsiderHostActions) const { |
| 244 | if (DoNotConsiderHostActions) |
| 245 | return getInputs().size() == (HostTC ? 2 : 1); |
| 246 | return !HostTC && getInputs().size() == 1; |
| 247 | } |
| 248 | |
| 249 | Action * |
| 250 | OffloadAction::getSingleDeviceDependence(bool DoNotConsiderHostActions) const { |
| 251 | assert(hasSingleDeviceDependence(DoNotConsiderHostActions) && |
| 252 | "Single device dependence does not exist!"); |
| 253 | // The previous assert ensures the number of entries in getInputs() is |
| 254 | // consistent with what we are doing here. |
| 255 | return HostTC ? getInputs()[1] : getInputs().front(); |
| 256 | } |
| 257 | |
| 258 | void OffloadAction::DeviceDependences::add(Action &A, const ToolChain &TC, |
| 259 | const char *BoundArch, |
| 260 | OffloadKind OKind) { |
| 261 | DeviceActions.push_back(&A); |
| 262 | DeviceToolChains.push_back(&TC); |
| 263 | DeviceBoundArchs.push_back(BoundArch); |
| 264 | DeviceOffloadKinds.push_back(OKind); |
| 265 | } |
| 266 | |
| 267 | OffloadAction::HostDependence::HostDependence(Action &A, const ToolChain &TC, |
| 268 | const char *BoundArch, |
| 269 | const DeviceDependences &DDeps) |
| 270 | : HostAction(A), HostToolChain(TC), HostBoundArch(BoundArch) { |
| 271 | for (auto K : DDeps.getOffloadKinds()) |
| 272 | HostOffloadKinds |= K; |
| 273 | } |
Artem Belevich | 0ff05cd | 2015-07-13 23:27:56 +0000 | [diff] [blame] | 274 | |
David Blaikie | 68e081d | 2011-12-20 02:48:34 +0000 | [diff] [blame] | 275 | void JobAction::anchor() {} |
| 276 | |
Justin Lebar | 4109461 | 2016-01-11 23:07:27 +0000 | [diff] [blame] | 277 | JobAction::JobAction(ActionClass Kind, Action *Input, types::ID Type) |
| 278 | : Action(Kind, Input, Type) {} |
Daniel Dunbar | 3f261ff | 2009-03-13 23:08:03 +0000 | [diff] [blame] | 279 | |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 280 | JobAction::JobAction(ActionClass Kind, const ActionList &Inputs, types::ID Type) |
Daniel Dunbar | 3f261ff | 2009-03-13 23:08:03 +0000 | [diff] [blame] | 281 | : Action(Kind, Inputs, Type) { |
| 282 | } |
| 283 | |
David Blaikie | 68e081d | 2011-12-20 02:48:34 +0000 | [diff] [blame] | 284 | void PreprocessJobAction::anchor() {} |
| 285 | |
Justin Lebar | 4109461 | 2016-01-11 23:07:27 +0000 | [diff] [blame] | 286 | PreprocessJobAction::PreprocessJobAction(Action *Input, types::ID OutputType) |
| 287 | : JobAction(PreprocessJobClass, Input, OutputType) {} |
Daniel Dunbar | 3f261ff | 2009-03-13 23:08:03 +0000 | [diff] [blame] | 288 | |
David Blaikie | 68e081d | 2011-12-20 02:48:34 +0000 | [diff] [blame] | 289 | void PrecompileJobAction::anchor() {} |
| 290 | |
Justin Lebar | 4109461 | 2016-01-11 23:07:27 +0000 | [diff] [blame] | 291 | PrecompileJobAction::PrecompileJobAction(Action *Input, types::ID OutputType) |
| 292 | : JobAction(PrecompileJobClass, Input, OutputType) {} |
Daniel Dunbar | 3f261ff | 2009-03-13 23:08:03 +0000 | [diff] [blame] | 293 | |
David Blaikie | 68e081d | 2011-12-20 02:48:34 +0000 | [diff] [blame] | 294 | void AnalyzeJobAction::anchor() {} |
| 295 | |
Justin Lebar | 4109461 | 2016-01-11 23:07:27 +0000 | [diff] [blame] | 296 | AnalyzeJobAction::AnalyzeJobAction(Action *Input, types::ID OutputType) |
| 297 | : JobAction(AnalyzeJobClass, Input, OutputType) {} |
Daniel Dunbar | 3f261ff | 2009-03-13 23:08:03 +0000 | [diff] [blame] | 298 | |
Ted Kremenek | f7639e1 | 2012-03-06 20:06:33 +0000 | [diff] [blame] | 299 | void MigrateJobAction::anchor() {} |
| 300 | |
Justin Lebar | 4109461 | 2016-01-11 23:07:27 +0000 | [diff] [blame] | 301 | MigrateJobAction::MigrateJobAction(Action *Input, types::ID OutputType) |
| 302 | : JobAction(MigrateJobClass, Input, OutputType) {} |
Ted Kremenek | f7639e1 | 2012-03-06 20:06:33 +0000 | [diff] [blame] | 303 | |
David Blaikie | 68e081d | 2011-12-20 02:48:34 +0000 | [diff] [blame] | 304 | void CompileJobAction::anchor() {} |
| 305 | |
Justin Lebar | 4109461 | 2016-01-11 23:07:27 +0000 | [diff] [blame] | 306 | CompileJobAction::CompileJobAction(Action *Input, types::ID OutputType) |
| 307 | : JobAction(CompileJobClass, Input, OutputType) {} |
Daniel Dunbar | 3f261ff | 2009-03-13 23:08:03 +0000 | [diff] [blame] | 308 | |
Bob Wilson | 23a55f1 | 2014-12-21 07:00:00 +0000 | [diff] [blame] | 309 | void BackendJobAction::anchor() {} |
| 310 | |
Justin Lebar | 4109461 | 2016-01-11 23:07:27 +0000 | [diff] [blame] | 311 | BackendJobAction::BackendJobAction(Action *Input, types::ID OutputType) |
| 312 | : JobAction(BackendJobClass, Input, OutputType) {} |
Bob Wilson | 23a55f1 | 2014-12-21 07:00:00 +0000 | [diff] [blame] | 313 | |
David Blaikie | 68e081d | 2011-12-20 02:48:34 +0000 | [diff] [blame] | 314 | void AssembleJobAction::anchor() {} |
| 315 | |
Justin Lebar | 4109461 | 2016-01-11 23:07:27 +0000 | [diff] [blame] | 316 | AssembleJobAction::AssembleJobAction(Action *Input, types::ID OutputType) |
| 317 | : JobAction(AssembleJobClass, Input, OutputType) {} |
Daniel Dunbar | 3f261ff | 2009-03-13 23:08:03 +0000 | [diff] [blame] | 318 | |
David Blaikie | 68e081d | 2011-12-20 02:48:34 +0000 | [diff] [blame] | 319 | void LinkJobAction::anchor() {} |
| 320 | |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 321 | LinkJobAction::LinkJobAction(ActionList &Inputs, types::ID Type) |
Daniel Dunbar | 3f261ff | 2009-03-13 23:08:03 +0000 | [diff] [blame] | 322 | : JobAction(LinkJobClass, Inputs, Type) { |
| 323 | } |
| 324 | |
David Blaikie | 68e081d | 2011-12-20 02:48:34 +0000 | [diff] [blame] | 325 | void LipoJobAction::anchor() {} |
| 326 | |
Mike Stump | 11289f4 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 327 | LipoJobAction::LipoJobAction(ActionList &Inputs, types::ID Type) |
Daniel Dunbar | 3f261ff | 2009-03-13 23:08:03 +0000 | [diff] [blame] | 328 | : JobAction(LipoJobClass, Inputs, Type) { |
| 329 | } |
Daniel Dunbar | 8829962 | 2010-06-04 18:28:36 +0000 | [diff] [blame] | 330 | |
David Blaikie | 68e081d | 2011-12-20 02:48:34 +0000 | [diff] [blame] | 331 | void DsymutilJobAction::anchor() {} |
| 332 | |
Daniel Dunbar | 8829962 | 2010-06-04 18:28:36 +0000 | [diff] [blame] | 333 | DsymutilJobAction::DsymutilJobAction(ActionList &Inputs, types::ID Type) |
| 334 | : JobAction(DsymutilJobClass, Inputs, Type) { |
| 335 | } |
Eric Christopher | 551ef45 | 2011-08-23 17:56:55 +0000 | [diff] [blame] | 336 | |
David Blaikie | 68e081d | 2011-12-20 02:48:34 +0000 | [diff] [blame] | 337 | void VerifyJobAction::anchor() {} |
| 338 | |
Justin Lebar | 4109461 | 2016-01-11 23:07:27 +0000 | [diff] [blame] | 339 | VerifyJobAction::VerifyJobAction(ActionClass Kind, Action *Input, |
| 340 | types::ID Type) |
| 341 | : JobAction(Kind, Input, Type) { |
Ben Langmuir | 9b9a8d3 | 2014-02-06 18:53:25 +0000 | [diff] [blame] | 342 | assert((Kind == VerifyDebugInfoJobClass || Kind == VerifyPCHJobClass) && |
| 343 | "ActionClass is not a valid VerifyJobAction"); |
| 344 | } |
| 345 | |
Ben Langmuir | 9b9a8d3 | 2014-02-06 18:53:25 +0000 | [diff] [blame] | 346 | void VerifyDebugInfoJobAction::anchor() {} |
| 347 | |
Justin Lebar | 4109461 | 2016-01-11 23:07:27 +0000 | [diff] [blame] | 348 | VerifyDebugInfoJobAction::VerifyDebugInfoJobAction(Action *Input, |
| 349 | types::ID Type) |
| 350 | : VerifyJobAction(VerifyDebugInfoJobClass, Input, Type) {} |
Ben Langmuir | 9b9a8d3 | 2014-02-06 18:53:25 +0000 | [diff] [blame] | 351 | |
| 352 | void VerifyPCHJobAction::anchor() {} |
| 353 | |
Justin Lebar | 4109461 | 2016-01-11 23:07:27 +0000 | [diff] [blame] | 354 | VerifyPCHJobAction::VerifyPCHJobAction(Action *Input, types::ID Type) |
| 355 | : VerifyJobAction(VerifyPCHJobClass, Input, Type) {} |
Samuel Antao | 69d6f31 | 2016-10-27 17:50:43 +0000 | [diff] [blame] | 356 | |
| 357 | void OffloadBundlingJobAction::anchor() {} |
| 358 | |
| 359 | OffloadBundlingJobAction::OffloadBundlingJobAction(ActionList &Inputs) |
| 360 | : JobAction(OffloadBundlingJobClass, Inputs, Inputs.front()->getType()) {} |
Samuel Antao | fab4f37 | 2016-10-27 18:00:51 +0000 | [diff] [blame^] | 361 | |
| 362 | void OffloadUnbundlingJobAction::anchor() {} |
| 363 | |
| 364 | OffloadUnbundlingJobAction::OffloadUnbundlingJobAction(Action *Input) |
| 365 | : JobAction(OffloadUnbundlingJobClass, Input, Input->getType()) {} |