summaryrefslogtreecommitdiff
path: root/test/Driver/cuda-output-asm.cu
diff options
context:
space:
mode:
authorSamuel Antao <sfantao@us.ibm.com>2016-10-27 00:53:34 +0000
committerSamuel Antao <sfantao@us.ibm.com>2016-10-27 00:53:34 +0000
commitb40469bc6c55cbaa6e0b17cda325d375b0b3572b (patch)
tree88a8a963181c97a8d9d025bd3b205f1d50bbdbab /test/Driver/cuda-output-asm.cu
parenta896e9a7d27788e7573f3ca13066cc5fc6d91da6 (diff)
downloadclang-b40469bc6c55cbaa6e0b17cda325d375b0b3572b.tar.gz
Fix bug when compiling CUDA code with -emit-llvm and -o.
In this case the device code is not injected into an host action and therefore the user should get an error as -o can't be used when generating two outputs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285263 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver/cuda-output-asm.cu')
-rw-r--r--test/Driver/cuda-output-asm.cu4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/Driver/cuda-output-asm.cu b/test/Driver/cuda-output-asm.cu
index af62478ac2..af066ce568 100644
--- a/test/Driver/cuda-output-asm.cu
+++ b/test/Driver/cuda-output-asm.cu
@@ -1,4 +1,4 @@
-// Tests CUDA compilation with -S.
+// Tests CUDA compilation with -S and -emit-llvm.
// REQUIRES: clang-driver
// REQUIRES: x86-registered-target
@@ -26,4 +26,6 @@
// RUN: %clang -### -S -target x86_64-linux-gnu --cuda-device-only \
// RUN: --cuda-gpu-arch=sm_20 --cuda-gpu-arch=sm_30 -o foo.s %s 2>&1 \
// RUN: | FileCheck -check-prefix MULTIPLE-OUTPUT-FILES %s
+// RUN: %clang -### -emit-llvm -c -target x86_64-linux-gnu -o foo.s %s 2>&1 \
+// RUN: | FileCheck -check-prefix MULTIPLE-OUTPUT-FILES %s
// MULTIPLE-OUTPUT-FILES: error: cannot specify -o when generating multiple output files