This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Add -emscripten-cxx-exceptions-whitelist option
ClosedPublic

Authored by aheejin on Aug 8 2016, 7:05 PM.

Details

Summary

This patch adds -emscripten-cxx-exceptions-whitelist option to WebAssemblyLowerEmscriptenExceptions pass. This options is the list of function names in which Emscripten-style exception handling is enabled. Depends on D22958.

Diff Detail

Event Timeline

aheejin updated this revision to Diff 67277.Aug 8 2016, 7:05 PM
aheejin retitled this revision from to [WebAssembly] Add -emscripten-cxx-exceptions-whitelist option.
aheejin updated this object.
aheejin added reviewers: dschuff, jpp.
dschuff added inline comments.Aug 9 2016, 9:47 AM
lib/Target/WebAssembly/WebAssemblyLowerEmscriptenExceptions.cpp
346

I assume that an empty whitelist means "every function catches exceptions." That's a little bit counterintuitive; I think it would be much clearer just to have an explicit bool (maybe that just gets set in runOnModule) that means "always allow exceptions".

aheejin updated this revision to Diff 67414.Aug 9 2016, 1:59 PM

Address comments

This revision was automatically updated to reflect the committed changes.
dschuff edited edge metadata.Aug 9 2016, 3:45 PM

(LGTM, committed)