[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 07:41:31 PDT 2024


jurahul wrote:

> Have you figured what was the issue with sorting? I couldn't find any pointer comparisons or anything else that would cause llvm::sort to behave differently from run to run.

Yes. The issue is that llv::sort() is not stable, so records with same name can end up in any order in the sorted list, so when reporting the error message, the error and note locations may get swapped. I have the fix in this PR, to use the Record->getName() as a secondary key for sorting. Please see the updated commit message as well.

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


More information about the llvm-commits mailing list