[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
Thu Jul 28 16:22:25 PDT 2016


sfantao created this revision.
sfantao added a reviewer: tra.
sfantao added a subscriber: cfe-commits.

Add test to detect the C++ include paths are passed to both CUDA host and device frontends.

https://reviews.llvm.org/D22946

Files:
  test/Driver/cuda-simple.cu

Index: test/Driver/cuda-simple.cu
===================================================================
--- test/Driver/cuda-simple.cu
+++ test/Driver/cuda-simple.cu
@@ -1,3 +1,8 @@
+//
+// REQUIRES: clang-driver
+// REQUIRES: x86-registered-target
+// REQUIRES: nvptx-registered-target
+//
 // Verify that we can parse a simple CUDA file with or without -save-temps
 // http://llvm.org/PR22936
 // RUN: %clang -nocudainc -Werror -fsyntax-only -c %s
@@ -13,6 +18,13 @@
 //
 // 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 frontend.
+// RUN: %clang -### -target x86_64-linux-gnu %s --sysroot=%S/Inputs/ubuntu_14.04_multiarch_tree2 2>&1 \
+// RUN: | FileCheck %s --check-prefix CHECK-CXXINCLUDE
+// CHECK-CXXINCLUDE: clang{{.*}} "-cc1" "-triple" "nvptx64-nvidia-cuda" {{.*}}"-internal-isystem" "{{.+}}/include/c++/4.8"
+// CHECK-CXXINCLUDE: clang{{.*}} "-cc1" "-triple" "x86_64--linux-gnu" {{.*}}"-internal-isystem" "{{.+}}/include/c++/4.8"
+// CHECK-CXXINCLUDE: ld" {{.*}}"-m" "elf_x86_64"
 
 int cudaConfigureCall(int, int);
 __attribute__((global)) void kernel() {}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22946.66051.patch
Type: text/x-patch
Size: 1225 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160728/65f333f8/attachment.bin>


More information about the cfe-commits mailing list