Justin Holewinski | 2c585b9 | 2012-05-24 17:43:12 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -triple nvptx-unknown-unknown -fcuda-is-device -emit-llvm -o - | FileCheck %s |
Peter Collingbourne | 744d90b | 2011-10-06 16:49:54 +0000 | [diff] [blame] | 2 | |
| 3 | #include "../SemaCUDA/cuda.h" |
| 4 | |
| 5 | // CHECK: define ptx_device{{.*}}device_function |
| 6 | __device__ void device_function() {} |
| 7 | |
| 8 | // CHECK: define ptx_kernel{{.*}}global_function |
| 9 | __global__ void global_function() { |
| 10 | // CHECK: call ptx_device{{.*}}device_function |
| 11 | device_function(); |
| 12 | } |