1 // RUN: %clang_cc1 %s -triple nvptx-unknown-unknown -fcuda-is-device -emit-llvm -o - | FileCheck %s
2
3 #include "Inputs/cuda.h"
4
5 // CHECK-LABEL: define void @device_function
6 extern "C"
device_function()7 __device__ void device_function() {}
8
9 // CHECK-LABEL: define void @global_function
10 extern "C"
global_function()11 __global__ void global_function() {
12 // CHECK: call void @device_function
13 device_function();
14 }
15
16 // CHECK: !{{[0-9]+}} = metadata !{void ()* @global_function, metadata !"kernel", i32 1}
17