aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/AsmPrinter
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-12 18:47:50 +0000
committerChris Lattner <sabre@nondot.org>2010-03-12 18:47:50 +0000
commitb0f129a5d9e07870b3cd69b3a61fb69554ae774d (patch)
treecc6a6fd2e62d6d014ac56b36214db028f9c18137 /lib/Target/X86/AsmPrinter
parent5ef31a039dbb9c36cfd78442b3554d1b6974ec4c (diff)
downloadexternal_llvm-b0f129a5d9e07870b3cd69b3a61fb69554ae774d.zip
external_llvm-b0f129a5d9e07870b3cd69b3a61fb69554ae774d.tar.gz
external_llvm-b0f129a5d9e07870b3cd69b3a61fb69554ae774d.tar.bz2
simplify code to use OutContext.GetOrCreateTemporarySymbol with
no arguments instead of having to come up with a unique name. This also makes the code less fragile. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98364 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/AsmPrinter')
-rw-r--r--lib/Target/X86/AsmPrinter/X86MCInstLower.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp b/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
index bde7bfd..f175907 100644
--- a/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
+++ b/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
@@ -406,11 +406,8 @@ void X86AsmPrinter::EmitInstruction(const MachineInstr *MI) {
// For this, we want to print something like:
// MYGLOBAL + (. - PICBASE)
// However, we can't generate a ".", so just emit a new label here and refer
- // to it. We know that this operand flag occurs at most once per function.
- const char *Prefix = MAI->getPrivateGlobalPrefix();
- MCSymbol *DotSym = OutContext.GetOrCreateTemporarySymbol(Twine(Prefix)+
- "picbaseref" +
- Twine(getFunctionNumber()));
+ // to it.
+ MCSymbol *DotSym = OutContext.GetOrCreateTemporarySymbol();
OutStreamer.EmitLabel(DotSym);
// Now that we have emitted the label, lower the complex operand expression.