[PATCH] D50980: [WebAssembly] Restore __stack_pointer after catch instructions

Jacob Gravelle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 20 15:17:52 PDT 2018


jgravelle-google added inline comments.


================
Comment at: lib/Target/WebAssembly/WebAssemblyEHRestoreStackPointer.cpp:58
+  if (MF.getTarget().getMCAsmInfo()->getExceptionHandlingType() !=
+          ExceptionHandling::Wasm ||
+      !MF.getFunction().hasPersonalityFn() || !MF.getFrameInfo().hasCalls())
----------------
This is kinda awkwardly indented, was this clang-formatted?
Might be worth extracting a temporary variable here for the `getExceptionHandlingType()` call, i.e. `auto EHType = MF.getTarget().getMCAsmInfo()->getExceptionHandlingType();`, which should make the line-breaks more consistent.

... Reading further down this patch, can we just call `needsPrologForEH` here?


Repository:
  rL LLVM

https://reviews.llvm.org/D50980





More information about the llvm-commits mailing list