[OpenMP][Tools] Fix Archer for MACOS
authorJoachim Protze <protze@itc.rwth-aachen.de>
Sat, 21 Nov 2020 23:08:39 +0000 (00:08 +0100)
committerJoachim Protze <protze@itc.rwth-aachen.de>
Wed, 9 Jun 2021 11:36:19 +0000 (13:36 +0200)
commit82e4e505315b8df27e82c0e1cb9d5eb1aa7d45da
tree59af2e5bda5920676a71b2a227bb5dc86258c772
parentd96ea46629803641038ebe46d8cd512f8cf7e20f
[OpenMP][Tools] Fix Archer for MACOS

Archer uses weak symbol overloads of TSan functions to enable loading the tool
even if the application is not built with TSan. For MACOS the tool collects
the function pointer at runtime.
When adding the function entry/exit markers, we missed to add the functions
in the MACOS codepath.
This patch also replaces the repeated function lookup by a single initial
function lookup and fixes the disabling logic in RunningOnValgrind.

Differential Revision: https://reviews.llvm.org/D103607
openmp/tools/archer/ompt-tsan.cpp