Skip to content

Commit

Permalink
WebAssembly: Move exception handling code together
Browse files Browse the repository at this point in the history
  • Loading branch information
arsenm committed Nov 2, 2022
1 parent 4fed59e commit cbce11c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
Expand Up @@ -119,10 +119,6 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf,
}
}
}
if (Personality == EHPersonality::Wasm_CXX) {
WasmEHFuncInfo &EHInfo = *MF->getWasmEHFuncInfo();
calculateWasmEHInfo(&fn, EHInfo);
}

// Initialize the mapping of values to registers. This is only set up for
// instruction values that are used outside of the block that defines
Expand Down Expand Up @@ -323,10 +319,10 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf,
const auto *BB = CME.Handler.get<const BasicBlock *>();
CME.Handler = MBBMap[BB];
}
}

else if (Personality == EHPersonality::Wasm_CXX) {
} else if (Personality == EHPersonality::Wasm_CXX) {
WasmEHFuncInfo &EHInfo = *MF->getWasmEHFuncInfo();
calculateWasmEHInfo(&fn, EHInfo);

// Map all BB references in the Wasm EH data to MBBs.
DenseMap<BBOrMBB, BBOrMBB> SrcToUnwindDest;
for (auto &KV : EHInfo.SrcToUnwindDest) {
Expand Down

0 comments on commit cbce11c

Please sign in to comment.