Skip to content

Commit 3b06361

Browse files
author
Vyacheslav Zakharin
committed
Test for predefined SPIR macros.
Signed-off-by: Vyacheslav Zakharin <[email protected]>
1 parent fdb931b commit 3b06361

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

clang/test/Preprocessor/predefined-macros.c

+11-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,17 @@
173173

174174
// RUN: %clang_cc1 %s -E -dM -o - -x cl -triple spir-unknown-unknown \
175175
// RUN: | FileCheck -match-full-lines %s --check-prefix=CHECK-SPIR
176-
// CHECK-SPIR: #define __IMAGE_SUPPORT__ 1
176+
// CHECK-SPIR-DAG: #define __IMAGE_SUPPORT__ 1
177+
// CHECK-SPIR-DAG: #define __SPIR__ 1
178+
// CHECK-SPIR-DAG: #define __SPIR32__ 1
179+
// CHECK-SPIR-NOT: #define __SPIR64__ 1
180+
181+
// RUN: %clang_cc1 %s -E -dM -o - -x cl -triple spir64-unknown-unknown \
182+
// RUN: | FileCheck -match-full-lines %s --check-prefix=CHECK-SPIR64
183+
// CHECK-SPIR64-DAG: #define __IMAGE_SUPPORT__ 1
184+
// CHECK-SPIR64-DAG: #define __SPIR__ 1
185+
// CHECK-SPIR64-DAG: #define __SPIR64__ 1
186+
// CHECK-SPIR32-NOT: #define __SPIR32__ 1
177187

178188
// RUN: %clang_cc1 %s -E -dM -o - -x hip -triple amdgcn-amd-amdhsa \
179189
// RUN: | FileCheck -match-full-lines %s --check-prefix=CHECK-HIP

0 commit comments

Comments
 (0)