Implement ML function arguments. Add representation for argument list in ML Function using TrailingObjects template. Implement argument iterators, parsing and printing.
Unrelated minor change - remove OperationStmt::dropReferences(). Since MLFunction does not have cyclic operand references (it's an AST) destruction can be safely done w/o a special pass to drop references.
PiperOrigin-RevId: 207583024
diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp
index 45df86a..ee8c68f 100644
--- a/lib/IR/Verifier.cpp
+++ b/lib/IR/Verifier.cpp
@@ -332,7 +332,8 @@
HashTable::ScopeTy topScope(liveValues);
// All of the arguments to the function are live for the whole function.
- // TODO: Add arguments when they are supported.
+ for (auto *arg : fn.getArguments())
+ liveValues.insert(arg, true);
// This recursive function walks the statement list pushing scopes onto the
// stack as it goes, and popping them to remove them from the table.