summaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/WasmEHPrepare.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/WasmEHPrepare.cpp')
-rw-r--r--llvm/lib/CodeGen/WasmEHPrepare.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/WasmEHPrepare.cpp b/llvm/lib/CodeGen/WasmEHPrepare.cpp
index fc98f594660b..1ea3e6bcb15c 100644
--- a/llvm/lib/CodeGen/WasmEHPrepare.cpp
+++ b/llvm/lib/CodeGen/WasmEHPrepare.cpp
@@ -247,8 +247,7 @@ bool WasmEHPrepareImpl::prepareEHPads(Function &F) {
// we depend on CoalesceFeaturesAndStripAtomics to downgrade it to
// non-thread-local ones, in which case we don't allow this object to be
// linked with other objects using shared memory.
- LPadContextGV = cast<GlobalVariable>(
- M.getOrInsertGlobal("__wasm_lpad_context", LPadContextTy));
+ LPadContextGV = M.getOrInsertGlobal("__wasm_lpad_context", LPadContextTy);
LPadContextGV->setThreadLocalMode(GlobalValue::GeneralDynamicTLSModel);
LPadIndexField = LPadContextGV;