diff options
| author | Rahul Joshi <rjoshi@nvidia.com> | 2024-10-01 09:54:11 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-01 09:54:11 -0700 |
| commit | a5dfcccd58c96de013939974d71cadc18c50b84e (patch) | |
| tree | f5b017324b1f089c52402ed91d5038708a022f33 /mlir/lib/TableGen/Predicate.cpp | |
| parent | fef3566a25ff0e34fb87339ba5e13eca17cec00f (diff) | |
[MLIR][TableGen] Change MLIR TableGen to use const Record * (#110687)
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
Diffstat (limited to 'mlir/lib/TableGen/Predicate.cpp')
| -rw-r--r-- | mlir/lib/TableGen/Predicate.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/TableGen/Predicate.cpp b/mlir/lib/TableGen/Predicate.cpp index 3c3c475f4d36..a2122f15af1f 100644 --- a/mlir/lib/TableGen/Predicate.cpp +++ b/mlir/lib/TableGen/Predicate.cpp @@ -79,10 +79,10 @@ const llvm::Record *CombinedPred::getCombinerDef() const { return def->getValueAsDef("kind"); } -std::vector<llvm::Record *> CombinedPred::getChildren() const { +std::vector<const llvm::Record *> CombinedPred::getChildren() const { assert(def->getValue("children") && "CombinedPred must have a value 'children'"); - return def->getValueAsListOfDefs("children"); + return def->getValueAsListOfConstDefs("children"); } namespace { |
