[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
This commit is contained in:
Joseph Huber 2022-07-15 15:34:50 -04:00
parent 4a40fa82c0
commit cdea437057
1 changed files with 2 additions and 2 deletions

View File

@ -202,12 +202,12 @@ enum OMPTgtExecModeFlags : int8_t {
// TODO: clang should use address space 5 for omp_thread_mem_alloc, but right
// now that's not the case.
#define THREAD_LOCAL(NAME) \
NAME [[clang::loader_uninitialized, clang::address_space(5)]]
[[clang::address_space(5)]] NAME [[clang::loader_uninitialized]]
// TODO: clang should use address space 4 for omp_const_mem_alloc, maybe it
// does?
#define CONSTANT(NAME) \
NAME [[clang::loader_uninitialized, clang::address_space(4)]]
[[clang::address_space(4)]] NAME [[clang::loader_uninitialized]]
// Attribute to keep alive certain definition for the bitcode library.
#ifdef LIBOMPTARGET_BC_TARGET