[OpenMP] Remove hidden visibility for declare target variables
authorJoseph Huber <jhuber6@vols.utk.edu>
Fri, 14 Jan 2022 22:21:46 +0000 (17:21 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Tue, 18 Jan 2022 17:53:20 +0000 (12:53 -0500)
commitd081bfcd17c1c704776a0964d239f19f6acde93d
tree20aeae78805f4a33a3dcfa7afb832a3110b1885a
parentdcb83b236421d5a4d6e767ee43ae1cdab5fce0f2
[OpenMP] Remove hidden visibility for declare target variables

This patch changes the visiblity of variables declared within a declare
target directive. Variable declarations within a declare target
directive need to be externally visible to the plugin for initialization
or reading. Previously this would cause runtime errors where the named
global could not be found because it was not included in the symbol
table.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D117362
clang/lib/AST/Decl.cpp
clang/test/OpenMP/declare_target_codegen.cpp
clang/test/OpenMP/declare_target_only_one_side_compilation.cpp