TableGen: give asm match classes deterministic order.
authorTim Northover <tnorthover@apple.com>
Mon, 16 Sep 2013 16:43:19 +0000 (16:43 +0000)
committerTim Northover <tnorthover@apple.com>
Mon, 16 Sep 2013 16:43:19 +0000 (16:43 +0000)
commit03f9197d62dddfb70e70acb5563518f589d29251
tree47cb7a587c45d11c8ab48b165c1a0f54441eb0c1
parent6dd670af758ee111593f81f355325e1b5960b870
TableGen: give asm match classes deterministic order.

TableGen was sorting the entries in some of its internal data
structures by pointer. This order filtered through to the final
matching table and affected the diagnostics produced on bad assembly
occasionally.

It also turns out STL algorithms are ridiculously easy to misuse on
containers with custom order methods. (No bugs before, or now that I
know of, but plenty in the middle).

This should fix the sanitizer bot, which ends up with weird pointers.

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