]> granicus.if.org Git - clang/commitdiff
[CUDA] Regression test to make sure C++ include path are forwarded to host and device...
authorSamuel Antao <sfantao@us.ibm.com>
Tue, 9 Aug 2016 17:27:24 +0000 (17:27 +0000)
committerSamuel Antao <sfantao@us.ibm.com>
Tue, 9 Aug 2016 17:27:24 +0000 (17:27 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278140 91177308-0d34-0410-b5e6-96231b3b80d8

test/Driver/cuda-detect.cu

index 3df3fbe29d33863bed4e34ed003d1d5a2ff297af..409c755788706f6788faaeebabcc9b22c3c3f8d8 100644 (file)
 // 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{{.*}}"