From 5e743c39f6a1efd8af0a0e05cdf36b9c0dfa9424 Mon Sep 17 00:00:00 2001 From: Samuel Antao Date: Tue, 9 Aug 2016 17:27:24 +0000 Subject: [PATCH] [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278140 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Driver/cuda-detect.cu | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/Driver/cuda-detect.cu b/test/Driver/cuda-detect.cu index 3df3fbe29d..409c755788 100644 --- a/test/Driver/cuda-detect.cu +++ b/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{{.*}}" -- 2.40.0