================
@@ -525,9 +544,13 @@ cir::GlobalOp
LoweringPreparePass::getOrCreateRuntimeVariable(
return g;
}
-cir::FuncOp LoweringPreparePass::buildRuntimeFunction(
- mlir::OpBuilder &builder, llvm::StringRef name, mlir::Location loc,
- cir::FuncType type, cir::GlobalLinkageKind linkage) {
+/// Declare `name` in `mlirModule` if it is not already declared there, and
+/// return the declaration. Free-standing so that ComplexLoweringPass can
+/// reach it without a LoweringPreparePass instance.
+static cir::FuncOp buildRuntimeFunction(
+ mlir::OpBuilder &builder, mlir::ModuleOp mlirModule, llvm::StringRef name,
----------------
erichkeane wrote:
This seems particularly awkward/ Should we instead be splitting
`buildRuntimeFunction` out somewhere else? I find myself wondering why this
isn't somewhere more global more useful anyway. So instead of this 'static'
function, we should move `buildRuntimeFunction` somewhere more accessible.
https://github.com/llvm/llvm-project/pull/216498
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits