This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Fix LowerEmscriptenEHSjLj when there's only longjmp
ClosedPublic

Authored by aheejin on Nov 8 2018, 1:34 PM.

Details

Summary

The pass incorrectly assumed if there's a longjmp declaration in the
module, there is also a setjmp function declaration. Fixed it, and now
the pass only converts longjmp and does not do any other transformation
when there's no setjmp declaration in the module.

Fixes PR39562.

Diff Detail

Repository
rL LLVM

Event Timeline

aheejin created this revision.Nov 8 2018, 1:34 PM
aheejin edited the summary of this revision. (Show Details)Nov 8 2018, 1:35 PM
aheejin added inline comments.Nov 8 2018, 1:37 PM
lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
211 ↗(On Diff #173217)

Indentation fix after renumbering comments

And the previous code actually failed without -s WASM_OBJECT_FILES=1 too.

sbc100 accepted this revision.Nov 8 2018, 1:58 PM

Nice!

This revision is now accepted and ready to land.Nov 8 2018, 1:58 PM
jgravelle-google accepted this revision.Nov 8 2018, 1:59 PM
aheejin edited the summary of this revision. (Show Details)Nov 8 2018, 2:24 PM
This revision was automatically updated to reflect the committed changes.