[clang] [CIR] Add proper handling for no prototype function calls (PR #150553)
Sirui Mu via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 25 08:56:00 PDT 2025
================
@@ -1805,7 +1887,9 @@ CIRGenModule::createCIRFunction(mlir::Location loc, StringRef name,
func = builder.create<cir::FuncOp>(loc, name, funcType);
assert(!cir::MissingFeatures::opFuncAstDeclAttr());
- assert(!cir::MissingFeatures::opFuncNoProto());
+
+ if (funcDecl && !funcDecl->hasPrototype())
+ func.setNoProtoAttr(builder.getUnitAttr());
----------------
Lancern wrote:
```suggestion
func.setNoProto(true);
```
https://github.com/llvm/llvm-project/pull/150553
More information about the cfe-commits
mailing list