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)
commit9ab09237dcfedb123340676d75e59821dac35513
tree435f70f63ffcd0c9e9232b6fd186f46aec16461e
parent0641ca1a2dc2d4923ee702651aab2a9704d563b5
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.

llvm-svn: 232535
14 files changed:
llvm/include/llvm/CodeGen/AsmPrinter.h
llvm/include/llvm/MC/MCContext.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp
llvm/lib/MC/MCContext.cpp
llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
llvm/test/DebugInfo/X86/dwarf-aranges.ll
llvm/test/MC/AsmParser/rename.s
llvm/tools/dsymutil/DwarfLinker.cpp