[cfe-commits] r124541 - in /cfe/trunk/lib/CodeGen: CGVTables.cpp CodeGenModule.cpp CodeGenModule.h
Anders Carlsson
andersca at mac.com
Sat Jan 29 11:39:23 PST 2011
Author: andersca
Date: Sat Jan 29 13:39:23 2011
New Revision: 124541
URL: http://llvm.org/viewvc/llvm-project?rev=124541&view=rev
Log:
Get rid of an unneeded parameter from setGlobalVisibility.
Modified:
cfe/trunk/lib/CodeGen/CGVTables.cpp
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
cfe/trunk/lib/CodeGen/CodeGenModule.h
Modified: cfe/trunk/lib/CodeGen/CGVTables.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVTables.cpp?rev=124541&r1=124540&r2=124541&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVTables.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVTables.cpp Sat Jan 29 13:39:23 2011
@@ -2505,7 +2505,7 @@
static void setThunkVisibility(CodeGenModule &CGM, const CXXMethodDecl *MD,
const ThunkInfo &Thunk, llvm::Function *Fn) {
- CGM.setGlobalVisibility(Fn, MD, /*ForDef*/ true);
+ CGM.setGlobalVisibility(Fn, MD);
if (!CGM.getCodeGenOpts().HiddenWeakVTables)
return;
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=124541&r1=124540&r2=124541&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Sat Jan 29 13:39:23 2011
@@ -176,8 +176,7 @@
void CodeGenModule::setGlobalVisibility(llvm::GlobalValue *GV,
- const NamedDecl *D,
- bool IsForDefinition) const {
+ const NamedDecl *D) const {
// Internal definitions always have default visibility.
if (GV->hasLocalLinkage()) {
GV->setVisibility(llvm::GlobalValue::DefaultVisibility);
@@ -186,8 +185,7 @@
// Set visibility for definitions.
NamedDecl::LinkageInfo LV = D->getLinkageAndVisibility();
- if (LV.visibilityExplicit() ||
- (IsForDefinition && !GV->hasAvailableExternallyLinkage()))
+ if (LV.visibilityExplicit() || !GV->hasAvailableExternallyLinkage())
GV->setVisibility(GetLLVMVisibility(LV.visibility()));
}
@@ -196,7 +194,7 @@
void CodeGenModule::setTypeVisibility(llvm::GlobalValue *GV,
const CXXRecordDecl *RD,
bool IsForRTTI) const {
- setGlobalVisibility(GV, RD, /*IsForDefinition=*/true);
+ setGlobalVisibility(GV, RD);
if (!CodeGenOpts.HiddenWeakVTables)
return;
@@ -460,7 +458,7 @@
void CodeGenModule::SetCommonAttributes(const Decl *D,
llvm::GlobalValue *GV) {
if (isa<NamedDecl>(D))
- setGlobalVisibility(GV, cast<NamedDecl>(D), /*ForDef*/ true);
+ setGlobalVisibility(GV, cast<NamedDecl>(D));
else
GV->setVisibility(llvm::GlobalValue::DefaultVisibility);
@@ -1415,7 +1413,7 @@
setFunctionLinkage(D, Fn);
// FIXME: this is redundant with part of SetFunctionDefinitionAttributes
- setGlobalVisibility(Fn, D, /*ForDef*/ true);
+ setGlobalVisibility(Fn, D);
CodeGenFunction(*this).GenerateCode(D, Fn);
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.h?rev=124541&r1=124540&r2=124541&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.h Sat Jan 29 13:39:23 2011
@@ -259,8 +259,7 @@
/// setGlobalVisibility - Set the visibility for the given LLVM
/// GlobalValue.
- void setGlobalVisibility(llvm::GlobalValue *GV, const NamedDecl *D,
- bool IsForDefinition) const;
+ void setGlobalVisibility(llvm::GlobalValue *GV, const NamedDecl *D) const;
/// setTypeVisibility - Set the visibility for the given global
/// value which holds information about a type.
More information about the cfe-commits
mailing list