================ @@ -2549,10 +2572,15 @@ LogicalResult OperationConverter::legalizeConvertedArgumentTypes( }); return liveUserIt == val.user_end() ? nullptr : *liveUserIt; }; - for (auto &r : rewriterImpl.rewrites) - if (auto *rewrite = dyn_cast<BlockTypeConversionRewrite>(r.get())) - if (failed(rewrite->materializeLiveConversions(findLiveUser))) + // Note: `rewrites` may be reallocated as the loop is running. + for (int64_t i = 0; i < rewriterImpl.rewrites.size(); ++i) { ---------------- jpienaar wrote:
Range based? (yeah seems I'm focussed on loops this morning :)) https://github.com/llvm/llvm-project/pull/81759 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits