summaryrefslogtreecommitdiff
path: root/llvm/utils/TableGen/Common/OptEmitter.cpp
AgeCommit message (Collapse)Author
2024-09-13[LLVM][Option] Refactor option name comparison (#108219)Rahul Joshi
Move common functions shared by TableGen Option Emitter and Options library to Support: - Move `StrCmpOptionName` and base it on the existing version in OptTable.cpp, with an additional mode to control fall back to case insensitive comparison. - Add `StrCmpOptionPrefixes` to compare prefixes and use zip() to iterate through lists of prefixes. - Rename `CompareOptionRecords` to less ambiguous name `IsOptionRecordLess`. - Merge 2 back-to-back ifs with same condition in `IsOptionRecordLess`. Fixes https://github.com/llvm/llvm-project/issues/107723
2024-09-11[TableGen] Fix MacOS failure in Option Emitter. (#108225)Rahul Joshi
Handle the case of same pointer used as both inputs to the `CompareOptionRecords`, to avoid emitting errors for equivalent options. Follow-up to #107696.
2024-09-11[TableGen] Migrate Option Emitters to const RecordKeeper (#107696)Rahul Joshi
Migrate Opt/OptRST Emitters to const RecordKeeper. This is a part of effort to have better const correctness in TableGen backends: https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
2024-03-25[RFC][TableGen] Restructure TableGen Source (#80847)Pierre van Houtryve
Refactor of the llvm-tblgen source into: - a "Basic" library, which contains the bare minimum utilities to build `llvm-min-tablegen` - a "Common" library which contains all of the helpers for TableGen backends. Such helpers can be shared by more than one backend, and even unit tested (e.g. CodeExpander is, maybe we can add more over time) Fixes #80647