[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