<div dir="ltr">Thanks. It was an issue in;<div><a href="http://bb.pgr.jp/builders/msbuild-llvmclang-x64-msc18-DA/builds/739">http://bb.pgr.jp/builders/msbuild-llvmclang-x64-msc18-DA/builds/739</a><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Nov 13, 2015 at 2:38 AM Andrew Kaylor via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: akaylor<br>
Date: Thu Nov 12 11:36:03 2015<br>
New Revision: 252913<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=252913&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=252913&view=rev</a><br>
Log:<br>
[WinEH] Fix problem with removing an element from a SetVector while iterating.<br>
<br>
Patch provided by Yaron Keren. (Thanks!)<br>
<br>
<br>
Modified:<br>
llvm/trunk/lib/CodeGen/WinEHPrepare.cpp<br>
<br>
Modified: llvm/trunk/lib/CodeGen/WinEHPrepare.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/WinEHPrepare.cpp?rev=252913&r1=252912&r2=252913&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/WinEHPrepare.cpp?rev=252913&r1=252912&r2=252913&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/WinEHPrepare.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/WinEHPrepare.cpp Thu Nov 12 11:36:03 2015<br>
@@ -1665,18 +1665,12 @@ void WinEHPrepare::cloneCommonBlocks(<br>
<br>
// Remove this block from the FuncletBlocks set of any funclet that<br>
// isn't the funclet whose color we just selected.<br>
- for (auto It = BlockColors[BB].begin(), End = BlockColors[BB].end();<br>
- It != End; ) {<br>
- // The iterator must be incremented here because we are removing<br>
- // elements from the set we're walking.<br>
- auto Temp = It++;<br>
- BasicBlock *ContainingFunclet = *Temp;<br>
- if (ContainingFunclet != CorrectColor) {<br>
+ for (BasicBlock *ContainingFunclet : BlockColors[BB])<br>
+ if (ContainingFunclet != CorrectColor)<br>
FuncletBlocks[ContainingFunclet].erase(BB);<br>
- BlockColors[BB].remove(ContainingFunclet);<br>
- }<br>
- }<br>
-<br>
+ BlockColors[BB].remove_if([&](BasicBlock *ContainingFunclet) {<br>
+ return ContainingFunclet != CorrectColor;<br>
+ });<br>
// This should leave just one color for BB.<br>
assert(BlockColors[BB].size() == 1);<br>
continue;<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div></div>