diff options
author | Eric Christopher <echristo@gmail.com> | 2016-10-14 05:47:41 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2016-10-14 05:47:41 +0000 |
commit | 2bd52b5d91f7f560f86eb60a7852e5c2f44aefa3 (patch) | |
tree | 502348d7869485a76f4dcf7f47a75b72c62547d5 /llvm/lib/Target/TargetMachine.cpp | |
parent | 445c952bd0a3b35244476ba7ef9ff44b5483dfea (diff) | |
download | llvm-2bd52b5d91f7f560f86eb60a7852e5c2f44aefa3.zip llvm-2bd52b5d91f7f560f86eb60a7852e5c2f44aefa3.tar.gz llvm-2bd52b5d91f7f560f86eb60a7852e5c2f44aefa3.tar.bz2 |
In preparation for removing getNameWithPrefix off of TargetMachine,
sink the current behavior into the callers and sink
TargetMachine::getNameWithPrefix into TargetMachine::getSymbol.
llvm-svn: 284203
Diffstat (limited to 'llvm/lib/Target/TargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/TargetMachine.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp index 792280a..28c9f37 100644 --- a/llvm/lib/Target/TargetMachine.cpp +++ b/llvm/lib/Target/TargetMachine.cpp @@ -203,19 +203,13 @@ TargetIRAnalysis TargetMachine::getTargetIRAnalysis() { void TargetMachine::getNameWithPrefix(SmallVectorImpl<char> &Name, 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 { SmallString<128> NameStr; - getNameWithPrefix(NameStr, GV, Mang); const TargetLoweringObjectFile *TLOF = getObjFileLowering(); + TLOF->getNameWithPrefix(NameStr, GV, *this); return TLOF->getContext().getOrCreateSymbol(NameStr); } |