diff options
| author | Samuel Antao <sfantao@us.ibm.com> | 2016-10-27 00:53:34 +0000 |
|---|---|---|
| committer | Samuel Antao <sfantao@us.ibm.com> | 2016-10-27 00:53:34 +0000 |
| commit | 5b1a89a33b2313bea62b18e9272a42f73b791c17 (patch) | |
| tree | 87a4459d35b43c5f811d7bf30884e660bd15f857 /clang/test | |
| parent | 94c427c23eb1e49354503f3a5980f5b574a02999 (diff) | |
| download | bcm5719-llvm-5b1a89a33b2313bea62b18e9272a42f73b791c17.tar.gz bcm5719-llvm-5b1a89a33b2313bea62b18e9272a42f73b791c17.zip | |
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.
llvm-svn: 285263
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Driver/cuda-output-asm.cu | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/test/Driver/cuda-output-asm.cu b/clang/test/Driver/cuda-output-asm.cu index af62478ac27..af066ce568e 100644 --- a/clang/test/Driver/cuda-output-asm.cu +++ b/clang/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 |

