[llvm] [TableGen] Rework error reporting for duplicate Feature/Processor. (PR #102257)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 7 09:14:55 PDT 2024


jurahul wrote:

> Fair enough. It looks like I'm wrong. (I wish someone could explain to me why.)

With an unstable sort, like `llvm::sort`, if two elements have the same key, it can put them in the output list in any order and it would be valid. One way to make an unstable sort stabe is to use the original index of each element as a secondary key, so elements with same "value" are ordered by their original index, making the sorting stable.

https://github.com/llvm/llvm-project/pull/102257


More information about the llvm-commits mailing list