summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorSamuel Antao <sfantao@us.ibm.com>2016-08-09 17:27:24 +0000
committerSamuel Antao <sfantao@us.ibm.com>2016-08-09 17:27:24 +0000
commit3be88013c6232a65a4a0430e42dbdf0218747aac (patch)
tree4543c6cdfa09f8556d71cca766a2de5a15096643 /clang/test
parentbab5a5d70434b2131186600aa055954eadac3a15 (diff)
downloadbcm5719-llvm-3be88013c6232a65a4a0430e42dbdf0218747aac.tar.gz
bcm5719-llvm-3be88013c6232a65a4a0430e42dbdf0218747aac.zip
[CUDA] Regression test to make sure C++ include path are forwarded to host and device frontends.
Summary: Add test to detect the C++ include paths are passed to both CUDA host and device frontends. Reviewers: tra Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D22946 llvm-svn: 278140
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Driver/cuda-detect.cu10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Driver/cuda-detect.cu b/clang/test/Driver/cuda-detect.cu
index 3df3fbe29d3..409c7557887 100644
--- a/clang/test/Driver/cuda-detect.cu
+++ b/clang/test/Driver/cuda-detect.cu
@@ -72,6 +72,11 @@
// RUN: | FileCheck %s -check-prefix COMMON \
// RUN: -check-prefix NOCUDAINC -check-prefix NOLIBDEVICE
+// Verify that C++ include paths are passed for both host and device frontends.
+// RUN: %clang -### -target x86_64-linux-gnu %s \
+// RUN: --sysroot=%S/Inputs/ubuntu_14.04_multiarch_tree2 2>&1 \
+// RUN: | FileCheck %s --check-prefix CHECK-CXXINCLUDE
+
// CHECK: Found CUDA installation: {{.*}}/Inputs/CUDA/usr/local/cuda
// NOCUDA-NOT: Found CUDA installation:
@@ -92,3 +97,8 @@
// CUDAINC-SAME: "-include" "__clang_cuda_runtime_wrapper.h"
// NOCUDAINC-NOT: "-include" "__clang_cuda_runtime_wrapper.h"
// COMMON-SAME: "-x" "cuda"
+// CHECK-CXXINCLUDE: clang{{.*}} "-cc1" "-triple" "nvptx64-nvidia-cuda"
+// CHECK-CXXINCLUDE-SAME: {{.*}}"-internal-isystem" "{{.+}}/include/c++/4.8"
+// CHECK-CXXINCLUDE: clang{{.*}} "-cc1" "-triple" "x86_64--linux-gnu"
+// CHECK-CXXINCLUDE-SAME: {{.*}}"-internal-isystem" "{{.+}}/include/c++/4.8"
+// CHECK-CXXINCLUDE: ld{{.*}}"
OpenPOWER on IntegriCloud