Ensure deterministic when printing ARM assembler constant pools
authorDavid Peixotto <dpeixott@codeaurora.org>
Thu, 19 Dec 2013 22:41:56 +0000 (22:41 +0000)
committerDavid Peixotto <dpeixott@codeaurora.org>
Thu, 19 Dec 2013 22:41:56 +0000 (22:41 +0000)
commita25701bc428eced8b57ec8b54fad7a4c23ec7e9d
tree18c5614e06aa781cd8eccb907f1319144dd7a52d
parentddc2347cc7c07438553bce6163b3e69113338ff4
Ensure deterministic when printing ARM assembler constant pools

We dump any non-empty assembler constant pools after a successful
parse of an assembly file that uses the ldr pseudo opcode. These
per-section constant pools should be output in a deterministic order
to ensure that we always generate the same output when printing the
output with an AsmStreamer.

This patch changes the map data struture used to associate a section
with its constant pool to a MapVector to ensure deterministic
output. Because this map type does not support deletion, we now
check that the constant pool is not empty before dumping its entries
and clear the entries after emitting them with the streamer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197735 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/AsmParser/ARMAsmParser.cpp