diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp index 33c6341744478..8bc288f1d29fc 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp @@ -343,9 +343,9 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf, for (auto &KV : EHInfo.UnwindDestToSrcs) { const auto *Dest = cast(KV.first); MachineBasicBlock *DestMBB = getMBB(Dest); - UnwindDestToSrcs[DestMBB] = SmallPtrSet(); + auto &Srcs = UnwindDestToSrcs[DestMBB]; for (const auto P : KV.second) - UnwindDestToSrcs[DestMBB].insert(getMBB(cast(P))); + Srcs.insert(getMBB(cast(P))); } EHInfo.UnwindDestToSrcs = std::move(UnwindDestToSrcs); }