Skip to content

Commit cbce11c

Browse files
committed
WebAssembly: Move exception handling code together
1 parent 4fed59e commit cbce11c

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,6 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf,
119119
}
120120
}
121121
}
122-
if (Personality == EHPersonality::Wasm_CXX) {
123-
WasmEHFuncInfo &EHInfo = *MF->getWasmEHFuncInfo();
124-
calculateWasmEHInfo(&fn, EHInfo);
125-
}
126122

127123
// Initialize the mapping of values to registers. This is only set up for
128124
// instruction values that are used outside of the block that defines
@@ -323,10 +319,10 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf,
323319
const auto *BB = CME.Handler.get<const BasicBlock *>();
324320
CME.Handler = MBBMap[BB];
325321
}
326-
}
327-
328-
else if (Personality == EHPersonality::Wasm_CXX) {
322+
} else if (Personality == EHPersonality::Wasm_CXX) {
329323
WasmEHFuncInfo &EHInfo = *MF->getWasmEHFuncInfo();
324+
calculateWasmEHInfo(&fn, EHInfo);
325+
330326
// Map all BB references in the Wasm EH data to MBBs.
331327
DenseMap<BBOrMBB, BBOrMBB> SrcToUnwindDest;
332328
for (auto &KV : EHInfo.SrcToUnwindDest) {

0 commit comments

Comments
 (0)