diff --git a/clang/lib/CodeGen/CGRTTI.cpp b/clang/lib/CodeGen/CGRTTI.cpp index 8af0ecd978bd..4ba58c716399 100644 --- a/clang/lib/CodeGen/CGRTTI.cpp +++ b/clang/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/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp index 5df3ac52b5af..6d8812a3aa85 100644 --- a/clang/lib/CodeGen/CGVTables.cpp +++ b/clang/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/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index ae61661da63a..d2be432bbf8b 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index f38c0bc018f5..bb32fff82684 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/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()))