diff options
author | Eric Christopher <echristo@gmail.com> | 2016-09-20 22:03:28 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2016-09-20 22:03:28 +0000 |
commit | c4636b30020d6a92c26c67af3f4ce30b28aefeeb (patch) | |
tree | ec7271759ed0fd6798a830897876eb2743d41333 /llvm/lib/Target/TargetMachine.cpp | |
parent | ea625ea01e200e4fac837d01e8abef665e3c8801 (diff) | |
download | llvm-c4636b30020d6a92c26c67af3f4ce30b28aefeeb.zip llvm-c4636b30020d6a92c26c67af3f4ce30b28aefeeb.tar.gz llvm-c4636b30020d6a92c26c67af3f4ce30b28aefeeb.tar.bz2 |
Revert "Remove extra argument used once on
TargetMachine::getNameWithPrefix and inline the result into the singular
caller." and "Remove more guts of TargetMachine::getNameWithPrefix and
migrate one check to the TLOF mach-o version." temporarily until I can
get the whole call migrated out of the TargetMachine as we could hit
places where TLOF isn't valid.
This reverts commits r281981 and r281983.
llvm-svn: 282028
Diffstat (limited to 'llvm/lib/Target/TargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/TargetMachine.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp index aa1916b..17caed9 100644 --- a/llvm/lib/Target/TargetMachine.cpp +++ b/llvm/lib/Target/TargetMachine.cpp @@ -199,8 +199,16 @@ TargetIRAnalysis TargetMachine::getTargetIRAnalysis() { } void TargetMachine::getNameWithPrefix(SmallVectorImpl<char> &Name, - const GlobalValue *GV, Mangler &Mang) const { - getObjFileLowering()->getNameWithPrefix(Name, GV, *this); + const GlobalValue *GV, Mangler &Mang, + bool MayAlwaysUsePrivate) const { + if (MayAlwaysUsePrivate || !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); + return; + } + const TargetLoweringObjectFile *TLOF = getObjFileLowering(); + TLOF->getNameWithPrefix(Name, GV, *this); } MCSymbol *TargetMachine::getSymbol(const GlobalValue *GV, Mangler &Mang) const { |