[OpenMP] Change debugging symbol to weak_odr linkage
authorJoseph Huber <jhuber6@vols.utk.edu>
Fri, 17 Sep 2021 19:48:54 +0000 (15:48 -0400)
committerJoseph Huber <jhuber6@vols.utk.edu>
Sat, 18 Sep 2021 01:25:24 +0000 (21:25 -0400)
commitc30d7730ebde18d61b33ae1de9ded69dac6ea6be
treee48e80f3610651b6f7b18f11cd83cfbeb7b00c15
parent724a1dff8a8eabee4ca03036dd3efd84ecd8298a
[OpenMP] Change debugging symbol to weak_odr linkage

The new device runtime uses an internal variable to set debugging. This
variable was originally privately linked because every module will have
a copy of it. This caused problems with merging the device bitcode
library because it would get renamed and there was not a way to refer to
an external, private symbol. This changes the symbol to weak_odr so it
can be defined multiply, but will not be renamed.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D109997
clang/test/OpenMP/target_debug_codegen.cpp
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp