Stablize MCK_Reg ordering in AsmMatcherEmitter
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Mon, 12 Aug 2013 10:39:45 +0000 (10:39 +0000)
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Mon, 12 Aug 2013 10:39:45 +0000 (10:39 +0000)
commitdfb5ceae90c016ba4ca8a7f1a3b79c360d888f30
treea99e4ae9b42bd2b4db619e0f6c4de29b2db2f840
parentac168b8bc8773a083a10902f64e4ae57a925aee4
Stablize MCK_Reg ordering in AsmMatcherEmitter

clang bootstraps intermittently failed for me due a difference in
the MCK_Reg ordering in ARMGenAsmMatcher.inc.  E.g. in my latest
run the stage 1 and stage 3 versions were the same but the stage 2
one was different (though still functionally correct).  This meant
that the .o comparison failed.

MCK_Regs were assigned by iterating over a std::set< std::set<Record*> >,
and since std::set is sorted lexicographically, the order depended on the
order of the pointer values.  This patch replaces the pointer ordering
with LessRecordByID.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188164 91177308-0d34-0410-b5e6-96231b3b80d8
utils/TableGen/AsmMatcherEmitter.cpp