diff options
author | Yaxun Liu <Yaxun.Liu@amd.com> | 2018-08-28 21:09:09 +0000 |
---|---|---|
committer | Yaxun Liu <Yaxun.Liu@amd.com> | 2018-08-28 21:09:09 +0000 |
commit | ac8ccd58799dfde8fee9bb231fcb560e73029804 (patch) | |
tree | 4b8e3467241dbe7cae8213df1ae1042c14e36848 /clang/lib/Driver/Action.cpp | |
parent | 43083111a257f39282df92f3879dbaec54191337 (diff) | |
download | bcm5719-llvm-ac8ccd58799dfde8fee9bb231fcb560e73029804.tar.gz bcm5719-llvm-ac8ccd58799dfde8fee9bb231fcb560e73029804.zip |
[HIP] Fix output file extension
OffloadBundlingJobAction constructor accepts a list of JobAction as inputs.
The host JobAction is the last one. The file type of OffloadBundlingJobAction
should be determined by the host JobAction (the last one) instead of the first
one.
Since HIP emits LLVM bitcode for device compilation, device JobAction has
different file type as host Job Action. This bug causes incorrect output file
extension for HIP.
This patch fixes it by using the last input JobAction (host JobAction) to determine
file type of OffloadBundlingJobAction.
Differential Revision: https://reviews.llvm.org/D51336
llvm-svn: 340873
Diffstat (limited to 'clang/lib/Driver/Action.cpp')
-rw-r--r-- | clang/lib/Driver/Action.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Driver/Action.cpp b/clang/lib/Driver/Action.cpp index 99d588d9c00..f9090438751 100644 --- a/clang/lib/Driver/Action.cpp +++ b/clang/lib/Driver/Action.cpp @@ -382,7 +382,7 @@ VerifyPCHJobAction::VerifyPCHJobAction(Action *Input, types::ID Type) void OffloadBundlingJobAction::anchor() {} OffloadBundlingJobAction::OffloadBundlingJobAction(ActionList &Inputs) - : JobAction(OffloadBundlingJobClass, Inputs, Inputs.front()->getType()) {} + : JobAction(OffloadBundlingJobClass, Inputs, Inputs.back()->getType()) {} void OffloadUnbundlingJobAction::anchor() {} |