[clang] [CIR] Defer emitting function definitions (PR #142862)
Bruno Cardoso Lopes via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 4 15:50:58 PDT 2025
================
@@ -1523,6 +1523,50 @@ cir::FuncOp CIRGenModule::getOrCreateCIRFunction(
cir::FuncOp funcOp = createCIRFunction(
invalidLoc ? theModule->getLoc() : getLoc(funcDecl->getSourceRange()),
mangledName, mlir::cast<cir::FuncType>(funcType), funcDecl);
+
+ if (!dontDefer) {
----------------
bcardosolopes wrote:
In order to diminish levels of indentation, should this return early otherwise?
```
if (dontDefer)
return funcOp
// rest of code
```
https://github.com/llvm/llvm-project/pull/142862
More information about the cfe-commits
mailing list