From a61998926f41d6a3d36c51ba4196e290e7aa79e2 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Tue, 20 Sep 2016 16:04:50 +0000 Subject: [PATCH] Remove extra argument used once on TargetMachine::getNameWithPrefix and inline the result into the singular caller. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281981 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/TargetMachine.h | 2 +- lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 2 +- lib/Target/TargetMachine.cpp | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h index a01f4dbbf5b..667d54373cd 100644 --- a/include/llvm/Target/TargetMachine.h +++ b/include/llvm/Target/TargetMachine.h @@ -265,7 +265,7 @@ public: virtual bool targetSchedulesPostRAScheduling() const { return false; }; void getNameWithPrefix(SmallVectorImpl &Name, const GlobalValue *GV, - Mangler &Mang, bool MayAlwaysUsePrivate = false) const; + Mangler &Mang) const; MCSymbol *getSymbol(const GlobalValue *GV, Mangler &Mang) const; /// True if the target uses physical regs at Prolog/Epilog insertion diff --git a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index bbeb5552527..b92ffde2319 100644 --- a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -296,7 +296,7 @@ selectELFSectionForGlobal(MCContext &Ctx, const GlobalValue *GV, if (EmitUniqueSection && UniqueSectionNames) { Name.push_back('.'); - TM.getNameWithPrefix(Name, GV, Mang, true); + Mang.getNameWithPrefix(Name, GV, false); } unsigned UniqueID = MCContext::GenericSectionID; if (EmitUniqueSection && !UniqueSectionNames) { diff --git a/lib/Target/TargetMachine.cpp b/lib/Target/TargetMachine.cpp index 17caed97391..47c5a56ce09 100644 --- a/lib/Target/TargetMachine.cpp +++ b/lib/Target/TargetMachine.cpp @@ -199,9 +199,8 @@ TargetIRAnalysis TargetMachine::getTargetIRAnalysis() { } void TargetMachine::getNameWithPrefix(SmallVectorImpl &Name, - const GlobalValue *GV, Mangler &Mang, - bool MayAlwaysUsePrivate) const { - if (MayAlwaysUsePrivate || !GV->hasPrivateLinkage()) { + const GlobalValue *GV, Mangler &Mang) const { + if (!GV->hasPrivateLinkage()) { // Simple case: If GV is not private, it is not important to find out if // private labels are legal in this case or not. Mang.getNameWithPrefix(Name, GV, false); -- 2.50.1