summaryrefslogtreecommitdiffstats
path: root/clang/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
commitc273f241960cfcc402153a0fda38d0977bf00fd2 (patch)
treec19be5013fdac74000a87e3a2613fed484e6b965 /clang/lib/CodeGen/CGRTTI.cpp
parent36cd5cc1507cb06b281ea7712913ed90899215b1 (diff)
downloadbcm5719-llvm-c273f241960cfcc402153a0fda38d0977bf00fd2.tar.gz
bcm5719-llvm-c273f241960cfcc402153a0fda38d0977bf00fd2.zip
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 llvm-svn: 117781
Diffstat (limited to 'clang/lib/CodeGen/CGRTTI.cpp')
-rw-r--r--clang/lib/CodeGen/CGRTTI.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGRTTI.cpp b/clang/lib/CodeGen/CGRTTI.cpp
index 6dad2a044e3..d373b553f1e 100644
--- a/clang/lib/CodeGen/CGRTTI.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud