https://llvm.org/bugs/show_bug.cgi?id=26196

            Bug ID: 26196
           Summary: CodeGenMapTable can fail to delete duplicate
                    ColFieldValueMap entries
           Product: tools
           Version: 3.7
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: TableGen
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

There is a loop in emitEnums() (CodeGenMapTable.cpp) whose purpose is to remove
duplicate column field values. I think this loop is wrong because it increments
the loop counter regardless of whether a duplicate value is deleted or not.
When a duplicate _is_ deleted, the next value is skipped. So two duplicate
values is OK but if there are 3 consecutive duplicates, the third one isn't
deleted.

This is a problem, for me at least, because I end up with an enum that has
duplicate enumerators and my instruction mapping code won't compile.

I guess an easy fix would be to decrement j whenever a value is deleted.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to