summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Action.cpp
diff options
context:
space:
mode:
authorSamuel Antao <sfantao@us.ibm.com>2016-10-27 17:50:43 +0000
committerSamuel Antao <sfantao@us.ibm.com>2016-10-27 17:50:43 +0000
commit69d6f31f744a8b3dcb1a3fecae41a9d6f667b476 (patch)
tree5c8e8f72da3b46e46b3989fef3f8380f7a370ea2 /clang/lib/Driver/Action.cpp
parent093abab817e61da02ddc30774b22a16641deac38 (diff)
downloadbcm5719-llvm-69d6f31f744a8b3dcb1a3fecae41a9d6f667b476.tar.gz
bcm5719-llvm-69d6f31f744a8b3dcb1a3fecae41a9d6f667b476.zip
[Driver][OpenMP] Update actions builder to create bundling action when necessary.
Summary: In order to save the user from dealing with multiple output files (for host and device) while using separate compilation, a new action `OffloadBundlingAction` is used when the last phase is not linking. This action will then result in a job that uses the proposed bundling tool to create a single preprocessed/IR/ASM/Object file from multiple ones. The job creation for the new action will be proposed in a separate patch. Reviewers: echristo, tra, jlebar, ABataev, hfinkel Subscribers: whchung, mehdi_amini, cfe-commits, Hahnfeld, andreybokhanko, arpith-jacob, carlo.bertolli, caomhin Differential Revision: https://reviews.llvm.org/D21852 llvm-svn: 285323
Diffstat (limited to 'clang/lib/Driver/Action.cpp')
-rw-r--r--clang/lib/Driver/Action.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Driver/Action.cpp b/clang/lib/Driver/Action.cpp
index a351429ad7b..90bc149fd33 100644
--- a/clang/lib/Driver/Action.cpp
+++ b/clang/lib/Driver/Action.cpp
@@ -36,6 +36,8 @@ const char *Action::getClassName(ActionClass AC) {
case DsymutilJobClass: return "dsymutil";
case VerifyDebugInfoJobClass: return "verify-debug-info";
case VerifyPCHJobClass: return "verify-pch";
+ case OffloadBundlingJobClass:
+ return "clang-offload-bundler";
}
llvm_unreachable("invalid class");
@@ -346,3 +348,8 @@ void VerifyPCHJobAction::anchor() {}
VerifyPCHJobAction::VerifyPCHJobAction(Action *Input, types::ID Type)
: VerifyJobAction(VerifyPCHJobClass, Input, Type) {}
+
+void OffloadBundlingJobAction::anchor() {}
+
+OffloadBundlingJobAction::OffloadBundlingJobAction(ActionList &Inputs)
+ : JobAction(OffloadBundlingJobClass, Inputs, Inputs.front()->getType()) {}
OpenPOWER on IntegriCloud