aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/TargetLoweringObjectFile.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-12 18:55:20 +0000
committerChris Lattner <sabre@nondot.org>2010-03-12 18:55:20 +0000
commit73ff564d65e9c748562c5734d1f72a2a233f0275 (patch)
tree5ab7da727ba858ad91fe7603179e1bdbbbc3ea88 /lib/Target/TargetLoweringObjectFile.cpp
parent0d941c15c0c88e062b548b74e0805e0ffb7427fe (diff)
downloadexternal_llvm-73ff564d65e9c748562c5734d1f72a2a233f0275.zip
external_llvm-73ff564d65e9c748562c5734d1f72a2a233f0275.tar.gz
external_llvm-73ff564d65e9c748562c5734d1f72a2a233f0275.tar.bz2
finally give Mangler a getSymbol method, which returns an MCSymbol
for a global instead of messing around with string buffers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98366 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetLoweringObjectFile.cpp')
-rw-r--r--lib/Target/TargetLoweringObjectFile.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/Target/TargetLoweringObjectFile.cpp b/lib/Target/TargetLoweringObjectFile.cpp
index 5a960d8..a093e2d 100644
--- a/lib/Target/TargetLoweringObjectFile.cpp
+++ b/lib/Target/TargetLoweringObjectFile.cpp
@@ -298,16 +298,7 @@ const MCExpr *TargetLoweringObjectFile::
getExprForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
MachineModuleInfo *MMI, unsigned Encoding,
MCStreamer &Streamer) const {
- // FIXME: Use GetGlobalValueSymbol.
- SmallString<128> Name;
- Mang->getNameWithPrefix(Name, GV, false);
- const MCSymbol *Sym;
-
- if (GV->hasPrivateLinkage())
- Sym = getContext().GetOrCreateTemporarySymbol(Name.str());
- else
- Sym = getContext().GetOrCreateSymbol(Name.str());
-
+ const MCSymbol *Sym = Mang->getSymbol(GV);
return getExprForDwarfReference(Sym, Mang, MMI, Encoding, Streamer);
}