[PATCH] D60232: [WebAssembly] EmscriptenEHSjLj: Don't abort if __THREW__ is defined

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 3 17:12:13 PDT 2019


sbc100 marked an inline comment as done.
sbc100 added inline comments.


================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp:338
 
-  return new GlobalVariable(M, IRB.getInt32Ty(), false,
-                            GlobalValue::ExternalLinkage, nullptr, Name);
+  auto* GV = dyn_cast<GlobalVariable>(M.getOrInsertGlobal(Name, IRB.getInt32Ty()));
+  if (!GV)
----------------
kripken wrote:
> I'm a little confused that previously we mentioned the linkage, but no longer do, and getorInsertGlobal doesn't document itself as setting Extrenal as the linkage?
AFAICT that is what it does: https://github.com/llvm-mirror/llvm/blob/21c63d584f9be3cdc2d045f53bebd3f83cd4d707/lib/IR/Module.cpp#L227


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60232/new/

https://reviews.llvm.org/D60232





More information about the llvm-commits mailing list