================
@@ -212,113 +228,84 @@ emitBodyAndFallthrough(CIRGenFunction &cgf, const
CoroutineBodyStmt &s,
return mlir::success();
}
-cir::CallOp CIRGenFunction::emitCoroIDBuiltinCall(mlir::Location loc,
- mlir::Value nullPtr) {
- cir::IntType int32Ty = builder.getUInt32Ty();
-
- const TargetInfo &ti = cgm.getASTContext().getTargetInfo();
- unsigned newAlign = ti.getNewAlign() / ti.getCharWidth();
+cir::CoroIntrinsicIdOp
+CIRGenFunction::emitCoroIDBuiltinCall(const CallExpr *e) {
+ mlir::Location loc = getLoc(e->getBeginLoc());
- mlir::Operation *builtin = cgm.getGlobalValue(cgm.builtinCoroId);
-
- cir::FuncOp fnOp;
- if (!builtin) {
- fnOp = cgm.createCIRBuiltinFunction(
- loc, cgm.builtinCoroId,
- cir::FuncType::get({int32Ty, voidPtrTy, voidPtrTy, voidPtrTy},
int32Ty),
- /*FD=*/nullptr);
- assert(fnOp && "should always succeed");
- } else {
- fnOp = cast<cir::FuncOp>(builtin);
+ llvm::SmallVector<mlir::Value, 4> args;
+ for (auto const *arg : e->arguments()) {
----------------
erichkeane wrote:
don't use `auto` here. Also, single line loops don't get curleys.
https://github.com/llvm/llvm-project/pull/211699
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits