[PATCH] D77358: [WebAssembly] EmscriptenEHSjLj: Mark another function as imported

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 20:04:30 PDT 2020


sbc100 created this revision.
Herald added subscribers: llvm-commits, sunfish, aheejin, hiraditya, jgravelle-google, dschuff.
Herald added a project: LLVM.
sbc100 added a reviewer: aheejin.

This should have been part of https://reviews.llvm.org/D77192


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77358

Files:
  llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
  llvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll


Index: llvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll
===================================================================
--- llvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll
+++ llvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll
@@ -310,6 +310,7 @@
 attributes #3 = { allocsize(0) }
 ; CHECK: attributes #{{[0-9]+}} = { "wasm-import-module"="env" "wasm-import-name"="__invoke_void" }
 ; CHECK: attributes #{{[0-9]+}} = { "wasm-import-module"="env" "wasm-import-name"="__cxa_find_matching_catch_3" }
+; CHECK: attributes #{{[0-9]+}} = { "wasm-import-module"="env" "wasm-import-name"="emscripten_longjmp_jmpbuf" }
 ; CHECK: attributes #{{[0-9]+}} = { "wasm-import-module"="env" "wasm-import-name"="__invoke_i8*_i32_%struct.__jmp_buf_tag*" }
 ; CHECK: attributes #{{[0-9]+}} = { "wasm-import-module"="env" "wasm-import-name"="__invoke_void_%struct.__jmp_buf_tag*_i32" }
 ; CHECK: attributes #[[ALLOCSIZE_ATTR]] = { allocsize(1) }
Index: llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
===================================================================
--- llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
+++ llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
@@ -698,7 +698,7 @@
       EmLongjmpJmpbufF = Function::Create(LongjmpF->getFunctionType(),
                                           GlobalValue::ExternalLinkage,
                                           "emscripten_longjmp_jmpbuf", &M);
-
+      markAsImported(EmLongjmpJmpbufF);
       LongjmpF->replaceAllUsesWith(EmLongjmpJmpbufF);
     }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77358.254679.patch
Type: text/x-patch
Size: 1549 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200403/cfe88579/attachment-0001.bin>


More information about the llvm-commits mailing list