Aaron Ballman | a670c20 | 2014-05-29 16:39:42 +0000 | [diff] [blame] | 1 | // RUN: c-index-test -test-load-source all -x cuda %s | FileCheck %s |
Eli Bendersky | 2581e66 | 2014-05-28 19:29:58 +0000 | [diff] [blame] | 2 | |
| 3 | __attribute__((device)) void f_device(); |
| 4 | __attribute__((global)) void f_global(); |
| 5 | __attribute__((constant)) int* g_constant; |
Eli Bendersky | 9b07147 | 2014-08-08 14:59:00 +0000 | [diff] [blame] | 6 | __attribute__((shared)) float *g_shared; |
Eli Bendersky | 2581e66 | 2014-05-28 19:29:58 +0000 | [diff] [blame] | 7 | __attribute__((host)) void f_host(); |
| 8 | |
Rafael Espindola | abbd6d6 | 2015-07-13 22:26:30 +0000 | [diff] [blame] | 9 | // CHECK: attributes-cuda.cu:3:30: FunctionDecl=f_device:3:30 |
| 10 | // CHECK-NEXT: attributes-cuda.cu:3:16: attribute(device) |
| 11 | // CHECK: attributes-cuda.cu:4:30: FunctionDecl=f_global:4:30 |
| 12 | // CHECK-NEXT: attributes-cuda.cu:4:16: attribute(global) |
| 13 | // CHECK: attributes-cuda.cu:5:32: VarDecl=g_constant:5:32 (Definition) |
| 14 | // CHECK-NEXT: attributes-cuda.cu:5:16: attribute(constant) |
| 15 | // CHECK: attributes-cuda.cu:6:32: VarDecl=g_shared:6:32 (Definition) |
| 16 | // CHECK-NEXT: attributes-cuda.cu:6:16: attribute(shared) |
| 17 | // CHECK: attributes-cuda.cu:7:28: FunctionDecl=f_host:7:28 |
| 18 | // CHECK-NEXT: attributes-cuda.cu:7:16: attribute(host) |