[Openmp-commits] [openmp] 1da6ae4 - [OpenMP][FIX] Ensure thread and team state are defined properly
Johannes Doerfert via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jul 21 19:58:01 PDT 2022
Author: Johannes Doerfert
Date: 2022-07-21T21:57:14-05:00
New Revision: 1da6ae4b5435ad2c66f78671bf28907295d17a7a
URL: https://github.com/llvm/llvm-project/commit/1da6ae4b5435ad2c66f78671bf28907295d17a7a
DIFF: https://github.com/llvm/llvm-project/commit/1da6ae4b5435ad2c66f78671bf28907295d17a7a.diff
LOG: [OpenMP][FIX] Ensure thread and team state are defined properly
The namespaces were missing causing the symbols to have "C" mangling.
To avoid this in the future we qualify the names now fully.
Added:
Modified:
openmp/libomptarget/DeviceRTL/src/State.cpp
Removed:
################################################################################
diff --git a/openmp/libomptarget/DeviceRTL/src/State.cpp b/openmp/libomptarget/DeviceRTL/src/State.cpp
index c72932a53551d..7a73330aa4cc0 100644
--- a/openmp/libomptarget/DeviceRTL/src/State.cpp
+++ b/openmp/libomptarget/DeviceRTL/src/State.cpp
@@ -219,13 +219,13 @@ void state::TeamStateTy::assertEqual(TeamStateTy &Other) const {
ASSERT(HasThreadState == Other.HasThreadState);
}
-namespace {
-
-state::TeamStateTy SHARED(TeamState);
+state::TeamStateTy SHARED(_OMP::state::TeamState);
__attribute__((loader_uninitialized))
-state::ThreadStateTy *ThreadStates[mapping::MaxThreadsPerTeam];
-#pragma omp allocate(ThreadStates) allocator(omp_pteam_mem_alloc)
+state::ThreadStateTy *_OMP::state::ThreadStates[mapping::MaxThreadsPerTeam];
+#pragma omp allocate(_OMP::state::ThreadStates) allocator(omp_pteam_mem_alloc)
+
+namespace {
int returnValIfLevelIsActive(int Level, int Val, int DefaultVal,
int OutOfBoundsVal = -1) {
More information about the Openmp-commits
mailing list