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
diff --git a/clang/lib/CodeGen/ItaniumCXXABI.cpp b/clang/lib/CodeGen/ItaniumCXXABI.cpp
index bbb323e..3661c0b 100644
--- a/clang/lib/CodeGen/ItaniumCXXABI.cpp
+++ b/clang/lib/CodeGen/ItaniumCXXABI.cpp
@@ -1531,7 +1531,7 @@
VTable->setComdat(CGM.getModule().getOrInsertComdat(VTable->getName()));
// Set the right visibility.
- CGM.setGVProperties(VTable, RD);
+ CGM.setGlobalVisibility(VTable, RD);
// Use pointer alignment for the vtable. Otherwise we would align them based
// on the size of the initializer which doesn't make sense as only single
@@ -1641,7 +1641,7 @@
VTable = CGM.CreateOrReplaceCXXRuntimeVariable(
Name, VTableType, llvm::GlobalValue::ExternalLinkage);
VTable->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
- CGM.setGVProperties(VTable, RD);
+ CGM.setGlobalVisibility(VTable, RD);
if (RD->hasAttr<DLLImportAttr>())
VTable->setDLLStorageClass(llvm::GlobalValue::DLLImportStorageClass);
@@ -2052,7 +2052,6 @@
false, var->getLinkage(),
llvm::ConstantInt::get(guardTy, 0),
guardName.str());
- guard->setDSOLocal(var->isDSOLocal());
guard->setVisibility(var->getVisibility());
// If the variable is thread-local, so is its guard variable.
guard->setThreadLocalMode(var->getThreadLocalMode());
@@ -3213,10 +3212,7 @@
llvmVisibility = CodeGenModule::GetLLVMVisibility(Ty->getVisibility());
TypeName->setVisibility(llvmVisibility);
- CGM.setDSOLocal(TypeName, Ty->getAsCXXRecordDecl());
-
GV->setVisibility(llvmVisibility);
- CGM.setDSOLocal(GV, Ty->getAsCXXRecordDecl());
if (CGM.getTriple().isWindowsItaniumEnvironment()) {
auto RD = Ty->getAsCXXRecordDecl();