[clang] [CIR] cir.call with scalar return type (PR #135552)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 14 10:58:24 PDT 2025
================
@@ -205,13 +205,15 @@ class CIRBaseBuilderTy : public mlir::OpBuilder {
// Call operators
//===--------------------------------------------------------------------===//
- cir::CallOp createCallOp(mlir::Location loc, mlir::SymbolRefAttr callee) {
- auto op = create<cir::CallOp>(loc, callee);
+ cir::CallOp createCallOp(mlir::Location loc, mlir::SymbolRefAttr callee,
+ mlir::Type returnType = cir::VoidType()) {
+ auto op = create<cir::CallOp>(loc, callee, /*resType=*/returnType);
----------------
erichkeane wrote:
```suggestion
auto op = create<cir::CallOp>(loc, callee, returnType);
```
We typically don't do these comments unless they make the code more clear/aren't obvious from the variable. So typically only for arguments that are literals.
https://github.com/llvm/llvm-project/pull/135552
More information about the cfe-commits
mailing list