Introduce IR and parser support for ML functions.
Representing function arguments is still TODO.
Supporting instructions other than return is also TODO.
PiperOrigin-RevId: 202570934
diff --git a/lib/IR/Function.cpp b/lib/IR/Function.cpp
index 833c173..3af2a61 100644
--- a/lib/IR/Function.cpp
+++ b/lib/IR/Function.cpp
@@ -16,6 +16,7 @@
// =============================================================================
#include "mlir/IR/CFGFunction.h"
+#include "mlir/IR/MLFunction.h"
#include "llvm/ADT/StringRef.h"
using namespace mlir;
@@ -38,3 +39,11 @@
CFGFunction::CFGFunction(StringRef name, FunctionType *type)
: Function(name, type, Kind::CFGFunc) {
}
+
+//===----------------------------------------------------------------------===//
+// MLFunction implementation.
+//===----------------------------------------------------------------------===//
+
+MLFunction::MLFunction(StringRef name, FunctionType *type)
+ : Function(name, type, Kind::MLFunc) {
+}