From: Anders Carlsson Date: Sat, 29 Jan 2011 05:26:32 +0000 (+0000) Subject: Remove IsDefinition from CodeGenModule::setTypeVisibility; it is always true. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c93a776c89bd0820813e5c7c87af2c820d9bbd27;p=clang Remove IsDefinition from CodeGenModule::setTypeVisibility; it is always true. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124529 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGRTTI.cpp b/lib/CodeGen/CGRTTI.cpp index 8af0ecd978..4ba58c7163 100644 --- a/lib/CodeGen/CGRTTI.cpp +++ b/lib/CodeGen/CGRTTI.cpp @@ -644,7 +644,7 @@ llvm::Constant *RTTIBuilder::BuildTypeInfo(QualType Ty, bool Force) { // compatibility. if (const RecordType *RT = dyn_cast(Ty)) CGM.setTypeVisibility(GV, cast(RT->getDecl()), - /*ForRTTI*/ true, /*ForDefinition*/ true); + /*ForRTTI=*/true); else if (Hidden || (CGM.getCodeGenOpts().HiddenWeakVTables && Linkage == llvm::GlobalValue::LinkOnceODRLinkage)) { diff --git a/lib/CodeGen/CGVTables.cpp b/lib/CodeGen/CGVTables.cpp index 5df3ac52b5..6d8812a3aa 100644 --- a/lib/CodeGen/CGVTables.cpp +++ b/lib/CodeGen/CGVTables.cpp @@ -3019,7 +3019,7 @@ CodeGenVTables::EmitVTableDefinition(llvm::GlobalVariable *VTable, VTable->setLinkage(Linkage); // Set the right visibility. - CGM.setTypeVisibility(VTable, RD, /*ForRTTI*/ false, /*ForDef*/ true); + CGM.setTypeVisibility(VTable, RD, /*ForRTTI=*/false); } llvm::GlobalVariable * diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index ae61661da6..d2be432bbf 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -195,9 +195,8 @@ void CodeGenModule::setGlobalVisibility(llvm::GlobalValue *GV, /// associated with the given type. void CodeGenModule::setTypeVisibility(llvm::GlobalValue *GV, const CXXRecordDecl *RD, - bool IsForRTTI, - bool IsForDefinition) const { - setGlobalVisibility(GV, RD, IsForDefinition); + bool IsForRTTI) const { + setGlobalVisibility(GV, RD, /*IsForDefinition=*/true); if (!CodeGenOpts.HiddenWeakVTables) return; diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index f38c0bc018..bb32fff826 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -265,7 +265,7 @@ public: /// setTypeVisibility - Set the visibility for the given global /// value which holds information about a type. void setTypeVisibility(llvm::GlobalValue *GV, const CXXRecordDecl *D, - bool IsForRTTI, bool IsForDefinition) const; + bool IsForRTTI) const; llvm::Constant *GetAddrOfGlobal(GlobalDecl GD) { if (isa(GD.getDecl()))