Skip to content

Commit b9fdcce

Browse files
Fix issues after rebase
1 parent 860bfd2 commit b9fdcce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/CIR/CodeGen/CIRGenCoroutine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ CIRGenFunction::emitCoroutineBody(const CoroutineBodyStmt &s) {
7070
mlir::Location openCurlyLoc = getLoc(s.getBeginLoc());
7171
cir::ConstantOp nullPtrCst = builder.getNullPtr(VoidPtrTy, openCurlyLoc);
7272

73-
cir::FuncOp fn = curFn;
73+
auto fn = dyn_cast<cir::FuncOp>(curFn);
7474
assert(fn && "other callables are NYI");
7575
fn.setCoroutine(true);
7676
cir::CallOp coroId = emitCoroIDBuiltinCall(openCurlyLoc, nullPtrCst);

0 commit comments

Comments
 (0)