Skip to content

Commit

Permalink
Remove extra argument used once on TargetMachine::getNameWithPrefix a…
Browse files Browse the repository at this point in the history
…nd inline the result into the singular caller.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281981 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
echristo committed Sep 20, 2016
1 parent 4e09440 commit a619989
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/llvm/Target/TargetMachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ class TargetMachine {
virtual bool targetSchedulesPostRAScheduling() const { return false; };

void getNameWithPrefix(SmallVectorImpl<char> &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
Expand Down
2 changes: 1 addition & 1 deletion lib/CodeGen/TargetLoweringObjectFileImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 2 additions & 3 deletions lib/Target/TargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,8 @@ TargetIRAnalysis TargetMachine::getTargetIRAnalysis() {
}

void TargetMachine::getNameWithPrefix(SmallVectorImpl<char> &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);
Expand Down

0 comments on commit a619989

Please sign in to comment.