diff options
Diffstat (limited to 'llvm/lib/CodeGen/WasmEHPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/WasmEHPrepare.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/WasmEHPrepare.cpp b/llvm/lib/CodeGen/WasmEHPrepare.cpp index 02516fad387..e9986f566c3 100644 --- a/llvm/lib/CodeGen/WasmEHPrepare.cpp +++ b/llvm/lib/CodeGen/WasmEHPrepare.cpp @@ -344,7 +344,8 @@ void WasmEHPrepare::prepareEHPad(BasicBlock *BB, bool NeedLSDA, PersCI->setDoesNotThrow(); // Pseudocode: int selector = __wasm.landingpad_context.selector; - Instruction *Selector = IRB.CreateLoad(SelectorField, "selector"); + Instruction *Selector = + IRB.CreateLoad(IRB.getInt32Ty(), SelectorField, "selector"); // Replace the return value from wasm.get.ehselector() with the selector value // loaded from __wasm_lpad_context.selector. |