From: Johannes Doerfert Date: Fri, 22 Jul 2022 00:29:18 +0000 (-0500) Subject: [OpenMP][FIX] Ensure thread and team state are defined properly X-Git-Tag: upstream/15.0.7~876 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1da6ae4b5435ad2c66f78671bf28907295d17a7a;p=platform%2Fupstream%2Fllvm.git [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. --- diff --git a/openmp/libomptarget/DeviceRTL/src/State.cpp b/openmp/libomptarget/DeviceRTL/src/State.cpp index c72932a..7a73330 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) {