Skip to content

Commit cdea437

Browse files
committed
[Libomptarget] Fix warnings on address space attributes
The device runtime uses the address space attribute to control the placement of important constants on the GPU. The changes made in D126061 caused these to start emitting errors as they were not applied to the type. This patch fixes the issues to make the warnings go away. Reviewed By: ye-luo Differential Revision: https://reviews.llvm.org/D129896
1 parent 4a40fa8 commit cdea437

File tree

1 file changed

+2
-2
lines changed
  • openmp/libomptarget/DeviceRTL/include

1 file changed

+2
-2
lines changed

openmp/libomptarget/DeviceRTL/include/Types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,12 @@ enum OMPTgtExecModeFlags : int8_t {
202202
// TODO: clang should use address space 5 for omp_thread_mem_alloc, but right
203203
// now that's not the case.
204204
#define THREAD_LOCAL(NAME) \
205-
NAME [[clang::loader_uninitialized, clang::address_space(5)]]
205+
[[clang::address_space(5)]] NAME [[clang::loader_uninitialized]]
206206

207207
// TODO: clang should use address space 4 for omp_const_mem_alloc, maybe it
208208
// does?
209209
#define CONSTANT(NAME) \
210-
NAME [[clang::loader_uninitialized, clang::address_space(4)]]
210+
[[clang::address_space(4)]] NAME [[clang::loader_uninitialized]]
211211

212212
// Attribute to keep alive certain definition for the bitcode library.
213213
#ifdef LIBOMPTARGET_BC_TARGET

0 commit comments

Comments
 (0)