[tablegen] Delete duplicates from a vector without skipping elements
authorVedant Kumar <vsk@apple.com>
Thu, 1 Dec 2016 19:38:50 +0000 (19:38 +0000)
committerVedant Kumar <vsk@apple.com>
Thu, 1 Dec 2016 19:38:50 +0000 (19:38 +0000)
commit47de8391c0d560e88e84382c9d5c2059e888353d
tree4938746c7b49ac6a3480b7952a959e789ec6341c
parent618d78ca40b81fb8ae196394c84a96fc80f77ee7
[tablegen] Delete duplicates from a vector without skipping elements

Tablegen's -gen-instr-info pass has a bug in its emitEnums() routine.
The function intends for values in a vector to be deduplicated, but it
accidentally skips over elements after performing a deletion.

I think there are smarter ways of doing this deduplication, but we can
do that in a follow-up commit if there's interest. See the thread:
[PATCH] TableGen InstrMapping Bug fix.

Patch by Tyler Kenney!

llvm-svn: 288408
llvm/test/TableGen/DuplicateFieldValues.td [new file with mode: 0644]
llvm/utils/TableGen/CodeGenMapTable.cpp