From 69d6f31f744a8b3dcb1a3fecae41a9d6f667b476 Mon Sep 17 00:00:00 2001 From: Samuel Antao Date: Thu, 27 Oct 2016 17:50:43 +0000 Subject: [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 --- clang/lib/Driver/Action.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'clang/lib/Driver/Action.cpp') 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()) {} -- cgit v1.2.3