diff options
author | Tim Northover <tnorthover@apple.com> | 2016-11-22 16:17:20 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2016-11-22 16:17:20 +0000 |
commit | b64fb453eaf3c2d768538571b2d99b4c5acf8911 (patch) | |
tree | 5caa3f2fde0a3e51156f873257f7f48f1dc6522f /llvm/lib/Target/TargetMachine.cpp | |
parent | 9a355219d19b316f3f5baa093164ca554e7af17e (diff) | |
download | bcm5719-llvm-b64fb453eaf3c2d768538571b2d99b4c5acf8911.tar.gz bcm5719-llvm-b64fb453eaf3c2d768538571b2d99b4c5acf8911.zip |
CodeGen: simplify TargetMachine::getSymbol interface. NFC.
No-one actually had a mangler handy when calling this function, and
getSymbol itself went most of the way towards getting its own mangler
(with a local TLOF variable) so forcing all callers to supply one was
just extra complication.
llvm-svn: 287645
Diffstat (limited to 'llvm/lib/Target/TargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/TargetMachine.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp index 792280af84d..e16ced1661a 100644 --- a/llvm/lib/Target/TargetMachine.cpp +++ b/llvm/lib/Target/TargetMachine.cpp @@ -213,9 +213,9 @@ void TargetMachine::getNameWithPrefix(SmallVectorImpl<char> &Name, TLOF->getNameWithPrefix(Name, GV, *this); } -MCSymbol *TargetMachine::getSymbol(const GlobalValue *GV, Mangler &Mang) const { - SmallString<128> NameStr; - getNameWithPrefix(NameStr, GV, Mang); +MCSymbol *TargetMachine::getSymbol(const GlobalValue *GV) const { const TargetLoweringObjectFile *TLOF = getObjFileLowering(); + SmallString<128> NameStr; + getNameWithPrefix(NameStr, GV, TLOF->getMangler()); return TLOF->getContext().getOrCreateSymbol(NameStr); } |