diff options
author | Anders Carlsson <andersca@mac.com> | 2011-01-29 20:24:48 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2011-01-29 20:24:48 +0000 |
commit | fa2e99f72f9bfe2270ea8caf76d0eef11c45259f (patch) | |
tree | ad88c5d1977189cec5304f75f090b97f1d309c48 /lib/CodeGen/CodeGenModule.cpp | |
parent | 3361cff6021195dc29aa9082ff8a0e5628de5f31 (diff) |
Change CodeGenModule::setTypeVisibility to take a TypeVisibilityKind enum instead of an "IsForRTTI" flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124546 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 66ac9fac5c..88de91afec 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -193,7 +193,7 @@ void CodeGenModule::setGlobalVisibility(llvm::GlobalValue *GV, /// associated with the given type. void CodeGenModule::setTypeVisibility(llvm::GlobalValue *GV, const CXXRecordDecl *RD, - bool IsForRTTI) const { + TypeVisibilityKind TVK) const { setGlobalVisibility(GV, RD); if (!CodeGenOpts.HiddenWeakVTables) @@ -242,9 +242,10 @@ void CodeGenModule::setTypeVisibility(llvm::GlobalValue *GV, // If there's a key function, there may be translation units // that don't have the key function's definition. But ignore // this if we're emitting RTTI under -fno-rtti. - if (!IsForRTTI || Features.RTTI) + if (!(TVK != TVK_ForRTTI) || Features.RTTI) { if (Context.getKeyFunction(RD)) return; + } // Otherwise, drop the visibility to hidden. GV->setVisibility(llvm::GlobalValue::HiddenVisibility); |