summaryrefslogtreecommitdiff
path: root/mlir/lib/TableGen/Predicate.cpp
diff options
context:
space:
mode:
authorRahul Joshi <rjoshi@nvidia.com>2024-10-01 09:54:11 -0700
committerGitHub <noreply@github.com>2024-10-01 09:54:11 -0700
commita5dfcccd58c96de013939974d71cadc18c50b84e (patch)
treef5b017324b1f089c52402ed91d5038708a022f33 /mlir/lib/TableGen/Predicate.cpp
parentfef3566a25ff0e34fb87339ba5e13eca17cec00f (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.cpp4
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 {