Rework the cloning infrastructure for statements to be able to take and update
an operand mapping, which simplifies it a bit. Implement cloning for IfStmt,
rename getThenClause() to getThen() which is unambiguous and less repetitive in
use cases.
PiperOrigin-RevId: 207915990
diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp
index ee8c68f..dde196c 100644
--- a/lib/IR/Verifier.cpp
+++ b/lib/IR/Verifier.cpp
@@ -371,10 +371,10 @@
// If this is an if or for, recursively walk the block they contain.
if (auto *ifStmt = dyn_cast<IfStmt>(&stmt)) {
- if (walkBlock(*ifStmt->getThenClause()))
+ if (walkBlock(*ifStmt->getThen()))
return true;
- if (auto *elseClause = ifStmt->getElseClause())
+ if (auto *elseClause = ifStmt->getElse())
if (walkBlock(*elseClause))
return true;
}