[PATCH] D111703: [ARM] __cxa_end_cleanup should be called instead of _UnwindResume.

Logan Chien via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 24 09:49:44 PDT 2021


logan added inline comments.


================
Comment at: llvm/lib/CodeGen/DwarfEHPrepare.cpp:82
 
+  bool isUnwindResume() const {
+    auto &Ctx = RewindFunction.getCallee()->getContext();
----------------
I think renaming this as `doesRewindFunctionNeedExceptionObject` would be better (since it is less tied to `_Unwind_Resume`) and change the implementation as:

```
  /// Determines whether the exception object must be passed to the rewind
  /// function.  For example, `_Unwind_Resume` expects an exception object but
  /// `__cxa_end_cleanup` does not.
  bool doesRewindFunctionNeedExceptionObject() const {
    auto *FTy = RewindFunction.getFunctionType();
    return FTy->getNumParams() > 0;
  }
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111703/new/

https://reviews.llvm.org/D111703



More information about the llvm-commits mailing list