[PATCH] D45559: [WebAssembly] Add Wasm personality and usesWindowsEHInstructions()

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 16 21:21:54 PDT 2018


aheejin added inline comments.


================
Comment at: include/llvm/Analysis/EHPersonalities.h:30
   GNU_CXX_SjLj,
+  GNU_CXX_Wasm,
   GNU_ObjC,
----------------
aheejin wrote:
> dschuff wrote:
> > We might just want to call this 'Wasm',  since it will be sort of a hybrid between MSVC (IR) and GNU (library API). Does the personality enum refer to just the personality function itself, or does it describe the scheme more generally?
> I named it `GNU_***` because the personality function itself is in GNU style, but this enum is used in more broad sense to check the scheme itself throughout the code. Should it be `CXX_Wasm` or `Wasm` then? Do you want to drop `CXX` part too?
I renamed it to `CXX_Wasm`. Let me know if what you meant was to drop `CXX` part as well.


================
Comment at: include/llvm/Analysis/EHPersonalities.h:80
+/// instructions: catchswitch, catchpad/ret, and cleanuppad/ret.
+inline bool usesWindowsEHInstructions(EHPersonality Pers) {
+  switch (Pers) {
----------------
dschuff wrote:
> Generally in this change you've gone from a fairly generic "funclet-based" to a more specific "windows"-related terminology; but of course you aren't doing this for windows; maybe this could be `usesCatchpadInstructions` or `usesCatchpadEH` which would be shorter and still generic.
Renamed it to `isScopedEHPersonality`, as @majnemer suggested.


Repository:
  rL LLVM

https://reviews.llvm.org/D45559





More information about the llvm-commits mailing list