diff options
-rw-r--r-- | clang/lib/Driver/Action.cpp | 2 | ||||
-rw-r--r-- | clang/test/Driver/hip-output-file-name.hip | 9 |
2 files changed, 10 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() {} diff --git a/clang/test/Driver/hip-output-file-name.hip b/clang/test/Driver/hip-output-file-name.hip new file mode 100644 index 00000000000..65887f44d4c --- /dev/null +++ b/clang/test/Driver/hip-output-file-name.hip @@ -0,0 +1,9 @@ +// REQUIRES: clang-driver +// REQUIRES: x86-registered-target +// REQUIRES: amdgpu-registered-target + +// RUN: %clang -### -c -target x86_64-linux-gnu \ +// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ +// RUN: 2>&1 | FileCheck %s + +// CHECK: {{.*}}clang-offload-bundler{{.*}}"-outputs=hip-output-file-name.o" |