[PATCH] D15781: [compiler-rt] Add support for ARM EHABI to gcc_personality_v0.

Logan Chien via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 26 21:38:38 PST 2015


logan added inline comments.

================
Comment at: compiler-rt/trunk/lib/builtins/gcc_personality_v0.c:141
@@ +140,3 @@
+ */
+static inline _Unwind_Reason_Code armEHABIUnwind(
+        struct _Unwind_Exception* exceptionObject,
----------------
I would suggest to use `continueUnwind` as the function name.  This name is more consistent with libc++abi counterpart.

================
Comment at: compiler-rt/trunk/lib/builtins/gcc_personality_v0.c:143
@@ +142,3 @@
+        struct _Unwind_Exception* exceptionObject,
+        struct _Unwind_Context *context) {
+    if (__gnu_unwind_frame(exceptionObject, context) != _URC_OK) {
----------------
Just be picky: Change the position of asterisk to:

```
struct _Unwind_Context* context
```

================
Comment at: compiler-rt/trunk/lib/builtins/gcc_personality_v0.c:144
@@ +143,3 @@
+        struct _Unwind_Context *context) {
+    if (__gnu_unwind_frame(exceptionObject, context) != _URC_OK) {
+        return _URC_FAILURE;
----------------
I think you should declare the function prototype before using `__gnu_unwind_frame()`.

================
Comment at: compiler-rt/trunk/lib/builtins/gcc_personality_v0.c:171
@@ -150,1 +170,3 @@
+         struct _Unwind_Exception* exceptionObject,
+         struct _Unwind_Context *context)
 #else
----------------
Just be picky: Change the position of asterisk to:

```
struct _Unwind_Context* context
```

================
Comment at: compiler-rt/trunk/lib/builtins/gcc_personality_v0.c:182
@@ +181,3 @@
+#if USING_ARM_EHABI
+    if ( (state & _US_ACTION_MASK) == _US_VIRTUAL_UNWIND_FRAME )
+        return armEHABIUnwind(exceptionObject, context);
----------------
`_US_ACTION_MASK` is missing from `<clang>/lib/Headers/unwind.h`.  You have to add it in another independent commit beforehand.  Otherwise, this commit will break self-bootstrap build.


http://reviews.llvm.org/D15781





More information about the llvm-commits mailing list