[PATCH] D22946: [CUDA] Regression test to make sure C++ include path are forwarded to host and device frontends.
Samuel Antao via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 9 07:07:34 PDT 2016
sfantao updated this revision to Diff 67335.
sfantao marked an inline comment as done.
sfantao added a comment.
- Move CUDA C++ include path tests to cuda-detect.cu. Address other Art's comments.
https://reviews.llvm.org/D22946
Files:
test/Driver/cuda-detect.cu
Index: test/Driver/cuda-detect.cu
===================================================================
--- test/Driver/cuda-detect.cu
+++ test/Driver/cuda-detect.cu
@@ -72,6 +72,14 @@
// RUN: | FileCheck %s -check-prefix COMMON \
// RUN: -check-prefix NOCUDAINC -check-prefix NOLIBDEVICE
+// Verify that compiler accepts CUDA syntax with "-x cuda-cpp-output".
+// RUN: %clang -Werror -fsyntax-only -x cuda-cpp-output -c %s
+//
+// 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 +100,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{{.*}}"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22946.67335.patch
Type: text/x-patch
Size: 1309 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160809/b99f11d9/attachment.bin>
More information about the cfe-commits
mailing list