diff options
author | Samuel Antao <sfantao@us.ibm.com> | 2016-10-27 17:50:43 +0000 |
---|---|---|
committer | Samuel Antao <sfantao@us.ibm.com> | 2016-10-27 17:50:43 +0000 |
commit | de524d8e3d494214c3db591ce52f1d80910b8b06 (patch) | |
tree | 7919499c49e8d5830e0214c9a83b3b6be609eb4e /lib/Driver/Action.cpp | |
parent | 1e029acdeb176aa3255c362f9f9ebe98ddb05134 (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285323 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Action.cpp')
-rw-r--r-- | lib/Driver/Action.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Driver/Action.cpp b/lib/Driver/Action.cpp index a351429ad7..90bc149fd3 100644 --- a/lib/Driver/Action.cpp +++ b/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()) {} |