[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGenCUDA / cxx-call-kernel.cpp
blob653e03c153cbea1c8a77829cdce53c5bbe92cc06
1 // REQUIRES: x86-registered-target
2 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu \
3 // RUN: -x hip -emit-llvm-bc %s -o %t.hip.bc
4 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu \
5 // RUN: -mlink-bitcode-file %t.hip.bc -DHIP_PLATFORM -emit-llvm \
6 // RUN: %s -o - | FileCheck %s
8 #include "Inputs/cuda.h"
10 // CHECK: @_Z2g1i = constant ptr @_Z17__device_stub__g1i, align 8
11 #if __HIP__
12 __global__ void g1(int x) {}
13 #else
14 extern void g1(int x);
16 // CHECK: call i32 @hipLaunchKernel{{.*}}@_Z2g1i
17 void test() {
18 hipLaunchKernel((void*)g1, 1, 1, nullptr, 0, 0);
21 // CHECK: __hipRegisterFunction{{.*}}@_Z2g1i
22 #endif