aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGRTTI.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-10-30 11:50:40 +0000
committerJohn McCall <rjmccall@apple.com>2010-10-30 11:50:40 +0000
commitaf14603ca61757cf4361b583b45639a04c57e651 (patch)
tree1b30c5de4e2e97f57485ed3c04b466be8f7f6938 /lib/CodeGen/CGRTTI.cpp
parentee30102a9ef32cdbf0afe0e4c07a53d265a18f98 (diff)
Better solution: calculate the visibility of functions and variables
independently of whether they're definitions, then teach IR generation to ignore non-explicit visibility when emitting declarations. Use this to make sure that RTTI, vtables, and VTTs get the right visibility. More of rdar://problem/8613093 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117781 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGRTTI.cpp')
-rw-r--r--lib/CodeGen/CGRTTI.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGRTTI.cpp b/lib/CodeGen/CGRTTI.cpp
index 6dad2a044e..d373b553f1 100644
--- a/lib/CodeGen/CGRTTI.cpp
+++ b/lib/CodeGen/CGRTTI.cpp
@@ -637,7 +637,7 @@ llvm::Constant *RTTIBuilder::BuildTypeInfo(QualType Ty, bool Force) {
// compatibility.
if (const RecordType *RT = dyn_cast<RecordType>(Ty))
CGM.setTypeVisibility(GV, cast<CXXRecordDecl>(RT->getDecl()),
- /*ForRTTI*/ true);
+ /*ForRTTI*/ true, /*ForDefinition*/ true);
else if (CGM.getCodeGenOpts().HiddenWeakVTables &&
Linkage == llvm::GlobalValue::WeakODRLinkage)
GV->setVisibility(llvm::GlobalValue::HiddenVisibility);