diff options
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.cpp')
-rw-r--r-- | llvm/utils/TableGen/CodeGenDAGPatterns.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp index fe14611..30eadbd 100644 --- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp @@ -2023,10 +2023,13 @@ void TreePatternNode::InlinePatternFragments( if (ChildAlternatives[i].empty()) return; - for (const auto &NewChild : ChildAlternatives[i]) - assert((Child->getPredicateCalls().empty() || - NewChild->getPredicateCalls() == Child->getPredicateCalls()) && - "Non-empty child predicate clobbered!"); + assert(Child->getPredicateCalls().empty() || + llvm::all_of(ChildAlternatives[i], + [&](const TreePatternNodePtr &NewChild) { + return NewChild->getPredicateCalls() == + Child->getPredicateCalls(); + }) && + "Non-empty child predicate clobbered!"); } // The end result is an all-pairs construction of the resultant pattern. |