aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGDecl.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2018-02-07 19:44:15 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2018-02-07 19:44:15 +0000
commit880c3b24c506f05e7b0524ae9e32edba79ea9c1b (patch)
treec9cb633012e94e624d91b5264c491feda12150c4 /clang/lib/CodeGen/CGDecl.cpp
parent876dc7124db14425693f1e4927b3a43f6c8e871c (diff)
downloadllvm-880c3b24c506f05e7b0524ae9e32edba79ea9c1b.zip
llvm-880c3b24c506f05e7b0524ae9e32edba79ea9c1b.tar.gz
llvm-880c3b24c506f05e7b0524ae9e32edba79ea9c1b.tar.bz2
Revert "Recommit r324107."
This reverts commit r324500. The bots found two failures: ThreadSanitizer-x86_64 :: Linux/pie_no_aslr.cc ThreadSanitizer-x86_64 :: pie_test.cc when using gold. The issue is a limitation in gold when building pie binaries. I will investigate how to work around it. llvm-svn: 324505
Diffstat (limited to 'clang/lib/CodeGen/CGDecl.cpp')
-rw-r--r--clang/lib/CodeGen/CGDecl.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index 7c05a0d..e3e4098 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -240,7 +240,7 @@ llvm::Constant *CodeGenModule::getOrCreateStaticVarDecl(
getModule(), LTy, Ty.isConstant(getContext()), Linkage, Init, Name,
nullptr, llvm::GlobalVariable::NotThreadLocal, TargetAS);
GV->setAlignment(getContext().getDeclAlign(&D).getQuantity());
- setGVProperties(GV, &D);
+ setGlobalVisibility(GV, &D);
if (supportsCOMDAT() && GV->isWeakForLinker())
GV->setComdat(TheModule.getOrInsertComdat(GV->getName()));
@@ -344,7 +344,6 @@ CodeGenFunction::AddInitializerToStaticVarDecl(const VarDecl &D,
OldGV->getThreadLocalMode(),
CGM.getContext().getTargetAddressSpace(D.getType()));
GV->setVisibility(OldGV->getVisibility());
- GV->setDSOLocal(OldGV->isDSOLocal());
GV->setComdat(OldGV->getComdat());
// Steal the name of the old global