Skip to content

Commit 1179bdf

Browse files
committed
WebAssembly: Remove unnecessary set check
The empty set will be default constructed if this wasn't in the map already.
1 parent cbce11c commit 1179bdf

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

llvm/include/llvm/CodeGen/WasmEHFuncInfo.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ struct WasmEHFuncInfo {
5050
}
5151
void setUnwindDest(const BasicBlock *BB, const BasicBlock *Dest) {
5252
SrcToUnwindDest[BB] = Dest;
53-
if (!UnwindDestToSrcs.count(Dest))
54-
UnwindDestToSrcs[Dest] = SmallPtrSet<BBOrMBB, 4>();
5553
UnwindDestToSrcs[Dest].insert(BB);
5654
}
5755
bool hasUnwindDest(const BasicBlock *BB) const {
@@ -76,8 +74,6 @@ struct WasmEHFuncInfo {
7674
}
7775
void setUnwindDest(MachineBasicBlock *MBB, MachineBasicBlock *Dest) {
7876
SrcToUnwindDest[MBB] = Dest;
79-
if (!UnwindDestToSrcs.count(Dest))
80-
UnwindDestToSrcs[Dest] = SmallPtrSet<BBOrMBB, 4>();
8177
UnwindDestToSrcs[Dest].insert(MBB);
8278
}
8379
bool hasUnwindDest(MachineBasicBlock *MBB) const {

0 commit comments

Comments
 (0)