Centralize the handling of unique ids for temporary labels.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 17 Mar 2015 20:07:06 +0000 (20:07 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 17 Mar 2015 20:07:06 +0000 (20:07 +0000)
commitb415e6b2f24d46e2dc663161fe80705b9c6c4264
tree26e4cff790b4b3136b28cb9dbd152bbb159dc16c
parent93920f0bcdead8b87e17165e43e808fc5cce1d79
Centralize the handling of unique ids for temporary labels.

Before this patch code wanting to create temporary labels for a given entity
(function, cu, exception range, etc) had to keep its own counter to have stable
symbol names.

createTempSymbol would still add a suffix to make sure a new symbol was always
returned, but it kept a single counter. Because of that, if we were to use
just createTempSymbol("cu_begin"), the label could change from cu_begin42 to
cu_begin43 because some other code started using temporary labels.

Simplify this by just keeping one counter per prefix and removing the various
specialized counters.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232535 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
include/llvm/CodeGen/AsmPrinter.h
include/llvm/MC/MCContext.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.h
lib/CodeGen/AsmPrinter/DwarfStringPool.cpp
lib/MC/MCContext.cpp
lib/Target/AArch64/AArch64AsmPrinter.cpp
lib/Target/PowerPC/PPCAsmPrinter.cpp
test/DebugInfo/X86/dwarf-aranges.ll
test/MC/AsmParser/rename.s
tools/dsymutil/DwarfLinker.cpp