Skip to content

Commit 1e41cf4

Browse files
committed
Use _Pragma
1 parent f905445 commit 1e41cf4

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

clang/lib/Headers/amdgpuintrin.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
#include <stdint.h>
1717

1818
#if !defined(__cplusplus)
19-
#pragma push_macro("bool")
19+
_Pragma("push_macro(\"bool\")");
2020
#define bool _Bool
2121
#endif
2222

23-
#pragma omp begin declare target device_type(nohost)
24-
#pragma omp begin declare variant match(device = {arch(amdgcn)})
23+
_Pragma("omp begin declare target device_type(nohost)");
24+
_Pragma("omp begin declare variant match(device = {arch(amdgcn)})");
2525

2626
// Type aliases to the address spaces used by the AMDGPU backend.
2727
#define __gpu_private __attribute__((opencl_private))
@@ -145,11 +145,11 @@ _DEFAULT_FN_ATTRS [[noreturn]] static __inline__ void __gpu_exit(void) {
145145
__builtin_amdgcn_endpgm();
146146
}
147147

148-
#pragma omp end declare variant
149-
#pragma omp end declare target
148+
_Pragma("omp end declare variant");
149+
_Pragma("omp end declare target");
150150

151151
#if !defined(__cplusplus)
152-
#pragma pop_macro("bool")
152+
_Pragma("pop_macro(\"bool\")");
153153
#endif
154154

155155
#endif // __AMDGPUINTRIN_H

clang/lib/Headers/gpuintrin.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
#endif
3535

3636
#if !defined(__cplusplus)
37-
#pragma push_macro("bool")
37+
_Pragma("push_macro(\"bool\")");
3838
#define bool _Bool
3939
#endif
4040

41-
#pragma omp begin declare target device_type(nohost)
41+
_Pragma("omp begin declare target device_type(nohost)");
4242

4343
// Returns the number of blocks in the requested dimension.
4444
_DEFAULT_FN_ATTRS static __inline__ uint32_t __gpu_num_blocks(int __dim) {
@@ -129,10 +129,10 @@ __gpu_lane_scan_u32(uint64_t __lane_mask, uint32_t x) {
129129
return x;
130130
}
131131

132-
#pragma omp end declare target
132+
_Pragma("omp end declare target");
133133

134134
#if !defined(__cplusplus)
135-
#pragma pop_macro("bool")
135+
_Pragma("pop_macro(\"bool\")");
136136
#endif
137137

138138
#undef _DEFAULT_FN_ATTRS

clang/lib/Headers/nvptxintrin.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
#include <stdint.h>
1717

1818
#if !defined(__cplusplus)
19-
#pragma push_macro("bool")
19+
_Pragma("push_macro(\"bool\")");
2020
#define bool _Bool
2121
#endif
2222

23-
#pragma omp begin declare target device_type(nohost)
24-
#pragma omp begin declare variant match(device = {arch(nvptx64)})
23+
_Pragma("omp begin declare target device_type(nohost)");
24+
_Pragma("omp begin declare variant match(device = {arch(nvptx64)})");
2525

2626
// Type aliases to the address spaces used by the NVPTX backend.
2727
#define __gpu_private __attribute__((opencl_private))
@@ -147,11 +147,11 @@ _DEFAULT_FN_ATTRS [[noreturn]] static __inline__ void __gpu_exit(void) {
147147
__nvvm_exit();
148148
}
149149

150-
#pragma omp end declare variant
151-
#pragma omp end declare target
150+
_Pragma("omp end declare variant");
151+
_Pragma("omp end declare target");
152152

153153
#if !defined(__cplusplus)
154-
#pragma pop_macro("bool")
154+
_Pragma("pop_macro(\"bool\")");
155155
#endif
156156

157157
#endif // __NVPTXINTRIN_H

0 commit comments

Comments
 (0)