File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -79,14 +79,15 @@ mlir::LogicalResult CIRGenFunction::emitStmt(const Stmt *s,
7979#define EXPR (Type, Base ) case Stmt::Type##Class:
8080#include " clang/AST/StmtNodes.inc"
8181 {
82- // Remember the block we came in on.
83- [[maybe_unused]] mlir::Block *incoming = builder.getInsertionBlock ();
84- assert (incoming && " expression emission must have an insertion point" );
82+ assert (builder.getInsertionBlock () &&
83+ " expression emission must have an insertion point" );
8584
8685 emitIgnoredExpr (cast<Expr>(s));
8786
88- [[maybe_unused]] mlir::Block *outgoing = builder.getInsertionBlock ();
89- assert (outgoing && " expression emission cleared block!" );
87+ // Classic codegen has a check here to see if the emitter created a new
88+ // block that isn't used (comparing the incoming and outgoing insertion
89+ // points) and deletes the outgoing block if it's not used. In CIR, we
90+ // will handle that during the cir.canonicalize pass.
9091 return mlir::success ();
9192 }
9293 case Stmt::IfStmtClass:
You can’t perform that action at this time.
0 commit comments