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; }