[Libomptarget][NFC] Remove constexpr to hide warnings

Currently whenever we compile the device runtime we get the following
'Mapping.cpp:32:32: warning: inline function '_OMP::impl::getGridValue'
is not defined [-Wundefined-inline]' warning. This can be silenced by
removing the constexpr attribute for this function. Doing this doesn't
change the generated bitcode at all but prevents the screen from getting
filled with warnings whenver we build the runtime.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D119747
This commit is contained in:
Joseph Huber 2022-02-14 14:01:04 -05:00
parent ad40cc14a8
commit 48e3dcecc4

View file

@ -29,7 +29,7 @@ namespace impl {
///{
#pragma omp begin declare variant match(device = {arch(amdgcn)})
constexpr const llvm::omp::GV &getGridValue() {
static const llvm::omp::GV &getGridValue() {
return llvm::omp::getAMDGPUGridValues<__AMDGCN_WAVEFRONT_SIZE>();
}
@ -104,7 +104,7 @@ uint32_t getNumHardwareThreadsInBlock() {
return __nvvm_read_ptx_sreg_ntid_x();
}
constexpr const llvm::omp::GV &getGridValue() {
static const llvm::omp::GV &getGridValue() {
return llvm::omp::NVPTXGridValues;
}