Add RTTIBuilder::GetAddrOfTypeName which uses the newly added CreateOrReplaceCXXRuntimeVariable.

Set the visibility for typeinfo names.

llvm-svn: 124548
This commit is contained in:
Anders Carlsson
2011-01-29 20:36:11 +00:00
parent 97a2895e73
commit 678632fa42
2 changed files with 42 additions and 5 deletions

View File

@@ -199,6 +199,10 @@ void CodeGenModule::setTypeVisibility(llvm::GlobalValue *GV,
if (!CodeGenOpts.HiddenWeakVTables)
return;
// We never want to drop the visibility for RTTI names.
if (TVK == TVK_ForRTTIName)
return;
// We want to drop the visibility to hidden for weak type symbols.
// This isn't possible if there might be unresolved references
// elsewhere that rely on this symbol being visible.