From f1b848e4701a4cd3fa781c259e3728faff1c31df Mon Sep 17 00:00:00 2001 From: River Riddle Date: Tue, 4 Jun 2019 19:18:23 -0700 Subject: NFC: Rename FuncBuilder to OpBuilder and refactor to take a top level region instead of a function. PiperOrigin-RevId: 251563898 --- mlir/bindings/python/pybind.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mlir/bindings/python/pybind.cpp') diff --git a/mlir/bindings/python/pybind.cpp b/mlir/bindings/python/pybind.cpp index 76cec271621..6ec0860ff7f 100644 --- a/mlir/bindings/python/pybind.cpp +++ b/mlir/bindings/python/pybind.cpp @@ -248,7 +248,7 @@ struct PythonFunctionContext { PythonFunction enter() { assert(function.function && "function is not set up"); auto *mlirFunc = static_cast(function.function); - contextBuilder.emplace(mlirFunc); + contextBuilder.emplace(mlirFunc->getBody()); context = new mlir::edsc::ScopedContext(*contextBuilder, mlirFunc->getLoc()); return function; @@ -262,7 +262,7 @@ struct PythonFunctionContext { PythonFunction function; mlir::edsc::ScopedContext *context; - llvm::Optional contextBuilder; + llvm::Optional contextBuilder; }; PythonFunctionContext PythonMLIRModule::makeFunctionContext( -- cgit v1.2.3