File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -2375,16 +2375,15 @@ mlir::Value ScalarExprEmitter::VisitExprWithCleanups(ExprWithCleanups *E) {
23752375 builder.getInsertionBlock ()};
23762376 auto scopeYieldVal = Visit (E->getSubExpr ());
23772377 if (scopeYieldVal) {
2378- lexScope.ForceCleanup (); // Defers to RunCleanupsScope's dtor and
2379- // scope handling
2378+ // Defend against dominance problems caused by jumps out of expression
2379+ // evaluation through the shared cleanup block. We do not pass {&V} to
2380+ // ForceCleanup, because the scope returns an rvalue.
2381+ lexScope.ForceCleanup ();
23802382 builder.create <cir::YieldOp>(loc, scopeYieldVal);
23812383 yieldTy = scopeYieldVal.getType ();
23822384 }
23832385 });
23842386
2385- // Defend against dominance problems caused by jumps out of expression
2386- // evaluation through the shared cleanup block.
2387- // TODO(cir): Scope.ForceCleanup({&V});
23882387 return scope.getNumResults () > 0 ? scope->getResult (0 ) : nullptr ;
23892388}
23902389
You can’t perform that action at this time.
0 commit comments