[llvm] [GISel][AArch64] Allow PatLeafs to be imported in GISel which were previously causing warnings (PR #140935)

Pierre van Houtryve via llvm-commits llvm-commits at lists.llvm.org
Tue May 27 00:36:45 PDT 2025


================
@@ -1297,6 +1297,17 @@ std::string TreePredicateFn::getGISelPredicateCode() const {
       PatFragRec->getRecord()->getValueAsString("GISelPredicateCode"));
 }
 
+bool TreePredicateFn::hasGISelRegPredicateCode() const {
+  return !PatFragRec->getRecord()
+              ->getValueAsString("GISelRegPredicateCode")
+              .empty();
+}
+
+std::string TreePredicateFn::getGISelRegPredicateCode() const {
+  return std::string(
+      PatFragRec->getRecord()->getValueAsString("GISelRegPredicateCode"));
----------------
Pierre-vh wrote:

```suggestion
  return
      PatFragRec->getRecord()->getValueAsString("GISelRegPredicateCode").str();
```

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


More information about the llvm-commits mailing list