diff options
author | Scott Linder <scott@scottlinder.com> | 2019-02-12 18:30:38 +0000 |
---|---|---|
committer | Scott Linder <scott@scottlinder.com> | 2019-02-12 18:30:38 +0000 |
commit | 80a1ee46d87b34f2bfabfc23e7226d615458bbec (patch) | |
tree | d10c2d340991820c685199a529aa820479927d40 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 1ca9dd8507c7541b86e313b4ff99cdb98ee4dfd2 (diff) | |
download | llvm-80a1ee46d87b34f2bfabfc23e7226d615458bbec.zip llvm-80a1ee46d87b34f2bfabfc23e7226d615458bbec.tar.gz llvm-80a1ee46d87b34f2bfabfc23e7226d615458bbec.tar.bz2 |
[AMDGPU] Require at least protected visibility for certain symbols
This allows the global visibility controls to be restrictive while still
populating the dynamic symbol table where required.
Differential Revision: https://reviews.llvm.org/D56871
llvm-svn: 353870
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index e6c6da2..ece26de 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -3212,6 +3212,9 @@ CodeGenModule::GetOrCreateLLVMGlobal(StringRef MangledName, return getTargetCodeGenInfo().performAddrSpaceCast(*this, GV, AddrSpace, ExpectedAS, Ty); + if (GV->isDeclaration()) + getTargetCodeGenInfo().setTargetAttributes(D, GV, *this); + return GV; } |