[PATCH] D18440: Don't use potentially invalidated iterator
Stephan Bergmann via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 31 08:47:25 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL265024: Don't use potentially invalidated iterator (authored by sberg).
Changed prior to commit:
http://reviews.llvm.org/D18440?vs=51536&id=52218#toc
Repository:
rL LLVM
http://reviews.llvm.org/D18440
Files:
llvm/trunk/lib/CodeGen/BranchFolding.cpp
Index: llvm/trunk/lib/CodeGen/BranchFolding.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/BranchFolding.cpp
+++ llvm/trunk/lib/CodeGen/BranchFolding.cpp
@@ -453,8 +453,10 @@
// Add the new block to the funclet.
const auto &FuncletI = FuncletMembership.find(&CurMBB);
- if (FuncletI != FuncletMembership.end())
- FuncletMembership[NewMBB] = FuncletI->second;
+ if (FuncletI != FuncletMembership.end()) {
+ auto n = FuncletI->second;
+ FuncletMembership[NewMBB] = n;
+ }
return NewMBB;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18440.52218.patch
Type: text/x-patch
Size: 565 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160331/5103bebd/attachment.bin>
More information about the llvm-commits
mailing list