r207978 - CodeGen: Cleanup visibility in RTTIBuilder
Duncan P. N. Exon Smith
dexonsmith at apple.com
Mon May 5 10:38:39 PDT 2014
Author: dexonsmith
Date: Mon May 5 12:38:39 2014
New Revision: 207978
URL: http://llvm.org/viewvc/llvm-project?rev=207978&view=rev
Log:
CodeGen: Cleanup visibility in RTTIBuilder
No functionality change.
Modified:
cfe/trunk/lib/CodeGen/CGRTTI.cpp
Modified: cfe/trunk/lib/CodeGen/CGRTTI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGRTTI.cpp?rev=207978&r1=207977&r2=207978&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGRTTI.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGRTTI.cpp Mon May 5 12:38:39 2014
@@ -678,18 +678,14 @@ llvm::Constant *RTTIBuilder::BuildTypeIn
// Give the type_info object and name the formal visibility of the
// type itself.
- Visibility formalVisibility = Ty->getVisibility();
- llvm::GlobalValue::VisibilityTypes llvmVisibility =
- CodeGenModule::GetLLVMVisibility(formalVisibility);
+ llvm::GlobalValue::VisibilityTypes llvmVisibility;
+ if (RTTIUniqueness == CGCXXABI::RUK_NonUniqueHidden)
+ llvmVisibility = llvm::GlobalValue::HiddenVisibility;
+ else
+ llvmVisibility = CodeGenModule::GetLLVMVisibility(Ty->getVisibility());
TypeName->setVisibility(llvmVisibility);
GV->setVisibility(llvmVisibility);
- // FIXME: integrate this better into the above when we move to trunk
- if (RTTIUniqueness == CGCXXABI::RUK_NonUniqueHidden) {
- TypeName->setVisibility(llvm::GlobalValue::HiddenVisibility);
- GV->setVisibility(llvm::GlobalValue::HiddenVisibility);
- }
-
return llvm::ConstantExpr::getBitCast(GV, CGM.Int8PtrTy);
}
More information about the cfe-commits
mailing list