================
@@ -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,
----------------
adams381 wrote:

It moved to `CIRTransformUtils`, which already holds the shared transform 
helpers.

While looking into this I discovered there is already a second copy. 
`EHABILowering.cpp` has `getOrCreateRuntimeFuncDecl`, which performs the same 
action.  However, its signature is a little different.  I can remove that copy 
and have it use this one, but it is in EH code and I'm not sure that change 
belongs here.  I think I should file a separate followup PR to clean that up.

https://github.com/llvm/llvm-project/pull/216498
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to