diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-12 18:47:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-12 18:47:50 +0000 |
commit | 2e1e0eeb1da522acacf4f06b7f06c1d4e96868d0 (patch) | |
tree | cc6a6fd2e62d6d014ac56b36214db028f9c18137 /lib/Target/X86/AsmPrinter/X86MCInstLower.cpp | |
parent | 4aeebec75cfa9bda32788bc338c82781d02dc060 (diff) | |
download | external_llvm-2e1e0eeb1da522acacf4f06b7f06c1d4e96868d0.zip external_llvm-2e1e0eeb1da522acacf4f06b7f06c1d4e96868d0.tar.gz external_llvm-2e1e0eeb1da522acacf4f06b7f06c1d4e96868d0.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/X86MCInstLower.cpp')
-rw-r--r-- | lib/Target/X86/AsmPrinter/X86MCInstLower.cpp | 7 |
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. |