28 lines · plain
1// Verify that we can parse a simple CUDA file with or without -save-temps2// http://llvm.org/PR229363// RUN: %clang --cuda-path=%S/Inputs/CUDA/usr/local/cuda \4// RUN: -nocudainc -nocudalib -Werror -fsyntax-only %s5//6// Verify that we pass -x cuda-cpp-output to compiler after7// preprocessing a CUDA file8// RUN: %clang --cuda-path=%S/Inputs/CUDA/usr/local/cuda \9// RUN: -Werror -### -save-temps -c %s 2>&1 | FileCheck %s10// CHECK-LABEL: "-cc1"11// CHECK: "-E"12// CHECK: "-x" "cuda"13// CHECK-LABEL: "-cc1"14// CHECK: "-x" "cuda-cpp-output"15//16// Verify that compiler accepts CUDA syntax with "-x cuda-cpp-output".17// RUN: %clang --cuda-path=%S/Inputs/CUDA/usr/local/cuda \18// RUN: -Werror -fsyntax-only -x cuda-cpp-output %s19 20extern "C" int cudaConfigureCall(int, int);21extern "C" int __cudaPushCallConfiguration(int, int);22 23__attribute__((global)) void kernel() {}24 25void func() {26 kernel<<<1,1>>>();27}28