]> granicus.if.org Git - clang/commit
[HIP] Fix output file extension
authorYaxun Liu <Yaxun.Liu@amd.com>
Tue, 28 Aug 2018 21:09:09 +0000 (21:09 +0000)
committerYaxun Liu <Yaxun.Liu@amd.com>
Tue, 28 Aug 2018 21:09:09 +0000 (21:09 +0000)
commitbc0fa1d5d54aa0b04e621e51c661f4203b3f2c2b
treea20f837c4577bd52ac8bb71d6990de0b7c709e27
parent0d9b8928f940a47b7a371964baa7bdc2bdeeb03d
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340873 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/Action.cpp
test/Driver/hip-output-file-name.hip [new file with mode: 0644]