diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2018-01-24 18:58:32 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2018-01-24 18:58:32 +0000 |
commit | 123ce97fac78bc4519afd5d2aba17c59c5717aad (patch) | |
tree | 8279da2927fcac8cfd8a0b7498aaebc7a90eac4b /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 7c2031fb958cdb70bb8081ec68f038ad13d99322 (diff) | |
download | bcm5719-llvm-123ce97fac78bc4519afd5d2aba17c59c5717aad.tar.gz bcm5719-llvm-123ce97fac78bc4519afd5d2aba17c59c5717aad.zip |
Don't create hidden dllimport global values.
Hidden visibility is almost the opposite of dllimport. We were
producing them before (dllimport wins in the existing llvm
implementation), but now the llvm verifier produces an error.
llvm-svn: 323361
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 68c82870846..641c99119bd 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -694,6 +694,8 @@ llvm::ConstantInt *CodeGenModule::getSize(CharUnits size) { void CodeGenModule::setGlobalVisibility(llvm::GlobalValue *GV, const NamedDecl *D, ForDefinition_t IsForDefinition) const { + if (GV->hasDLLImportStorageClass()) + return; // Internal definitions always have default visibility. if (GV->hasLocalLinkage()) { GV->setVisibility(llvm::GlobalValue::DefaultVisibility); |