207
|
1 // RUN: %clang_cc1 -ast-dump -x hip %s | FileCheck %s
|
|
2 // RUN: %clang_cc1 -ast-dump -fcuda-is-device -x hip %s | FileCheck %s
|
|
3
|
|
4 #include "Inputs/cuda.h"
|
|
5
|
|
6 // CHECK-LABEL: VarDecl {{.*}} m1 'int'
|
|
7 // CHECK-NEXT: HIPManagedAttr
|
|
8 // CHECK-NEXT: CUDADeviceAttr {{.*}}Implicit
|
|
9 __managed__ int m1;
|
|
10
|
|
11 // CHECK-LABEL: VarDecl {{.*}} m2 'int'
|
|
12 // CHECK-NEXT: HIPManagedAttr
|
|
13 // CHECK-NEXT: CUDADeviceAttr {{.*}}Implicit
|
|
14 // CHECK-NOT: HIPManagedAttr
|
|
15 // CHECK-NOT: CUDADeviceAttr
|
|
16 __managed__ __managed__ int m2;
|
|
17
|
|
18 // CHECK-LABEL: VarDecl {{.*}} m3 'int'
|
|
19 // CHECK-NEXT: HIPManagedAttr
|
|
20 // CHECK-NEXT: CUDADeviceAttr {{.*}}line
|
|
21 // CHECK-NOT: CUDADeviceAttr {{.*}}Implicit
|
|
22 __managed__ __device__ int m3;
|
|
23
|
|
24 // CHECK-LABEL: VarDecl {{.*}} m3a 'int'
|
|
25 // CHECK-NEXT: CUDADeviceAttr {{.*}}cuda.h
|
|
26 // CHECK-NEXT: HIPManagedAttr
|
|
27 // CHECK-NOT: CUDADeviceAttr {{.*}}Implicit
|
|
28 __device__ __managed__ int m3a;
|