Silence warnings in libunwind.

* Remove the embedded directive undefined behavior by moving the
  the #ifdef out of the macro arguments.  [-Wembedded-directive]

* Remove the local variable shadowing warning by renaming
  frameInfo in UnwindLevel1-gcc-ext.c.  [-Wshadow]

* Explicitly cast the function pointer to void pointer to avoid
  the comparison between function pointer and void pointer.
  [-Wpedantic]



git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@224690 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/src/Unwind/Unwind-EHABI.cpp b/src/Unwind/Unwind-EHABI.cpp
index a1a1922..55bef5a 100644
--- a/src/Unwind/Unwind-EHABI.cpp
+++ b/src/Unwind/Unwind-EHABI.cpp
@@ -249,7 +249,7 @@
                                              _Unwind_Exception* unwind_exception,
                                              _Unwind_Context* context);
     void *PR = (void*)signExtendPrel31(*data);
-    if (PR == &__gxx_personality_v0) {
+    if (PR == (void*)&__gxx_personality_v0) {
       *off = 1; // First byte is size data.
       *len = (((data[1] >> 24) & 0xff) + 1) * 4;
     } else
diff --git a/src/Unwind/UnwindLevel1-gcc-ext.c b/src/Unwind/UnwindLevel1-gcc-ext.c
index 9a02052..7b25ccf 100644
--- a/src/Unwind/UnwindLevel1-gcc-ext.c
+++ b/src/Unwind/UnwindLevel1-gcc-ext.c
@@ -25,12 +25,15 @@
 ///  Called by __cxa_rethrow().
 _LIBUNWIND_EXPORT _Unwind_Reason_Code
 _Unwind_Resume_or_Rethrow(_Unwind_Exception *exception_object) {
+#if LIBCXXABI_ARM_EHABI
   _LIBUNWIND_TRACE_API("_Unwind_Resume_or_Rethrow(ex_obj=%p), "
                        "private_1=%ld\n",
                        exception_object,
-#if LIBCXXABI_ARM_EHABI
                        (long)exception_object->unwinder_cache.reserved1);
 #else
+  _LIBUNWIND_TRACE_API("_Unwind_Resume_or_Rethrow(ex_obj=%p), "
+                       "private_1=%ld\n",
+                       exception_object,
                        (long)exception_object->private_1);
 #endif
 
@@ -145,14 +148,14 @@
     // debugging
     if (_LIBUNWIND_TRACING_UNWINDING) {
       char functionName[512];
-      unw_proc_info_t frameInfo;
+      unw_proc_info_t frame;
       unw_word_t offset;
       unw_get_proc_name(&cursor, functionName, 512, &offset);
-      unw_get_proc_info(&cursor, &frameInfo);
+      unw_get_proc_info(&cursor, &frame);
       _LIBUNWIND_TRACE_UNWINDING(
           " _backtrace: start_ip=0x%llX, func=%s, lsda=0x%llX, context=%p\n",
-          (long long)frameInfo.start_ip, functionName, (long long)frameInfo.lsda,
-          &cursor);
+          (long long)frame.start_ip, functionName,
+          (long long)frame.lsda, &cursor);
     }
 
     // call trace function with this frame