[compiler-rt] r248686 - builtins: silence GCC warning

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 27 10:16:46 PDT 2015


Author: compnerd
Date: Sun Sep 27 12:16:46 2015
New Revision: 248686

URL: http://llvm.org/viewvc/llvm-project?rev=248686&view=rev
Log:
builtins: silence GCC warning

If the builtins are built with libgcc as the unwind provider on ARM, the exposed
_Unwind_SetIP is a macro.  This results in the following warning due to
expansion of the argument:

warning: suggest parentheses around arithmetic in operand of ‘|’ [-Wparentheses]

Add a no-op set of parenthesis around the argument that will prevent this
warning.

Modified:
    compiler-rt/trunk/lib/builtins/gcc_personality_v0.c

Modified: compiler-rt/trunk/lib/builtins/gcc_personality_v0.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/gcc_personality_v0.c?rev=248686&r1=248685&r2=248686&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/gcc_personality_v0.c (original)
+++ compiler-rt/trunk/lib/builtins/gcc_personality_v0.c Sun Sep 27 12:16:46 2015
@@ -194,15 +194,15 @@ __gcc_personality_v0(int version, _Unwin
              * Set Instruction Pointer to so we re-enter function 
              * at landing pad. The landing pad is created by the compiler
              * to take two parameters in registers.
-	     */
-            _Unwind_SetGR(context, __builtin_eh_return_data_regno(0), 
-                                                (uintptr_t)exceptionObject);
+             */
+            _Unwind_SetGR(context, __builtin_eh_return_data_regno(0),
+                          (uintptr_t)exceptionObject);
             _Unwind_SetGR(context, __builtin_eh_return_data_regno(1), 0);
-            _Unwind_SetIP(context, funcStart+landingPad);
+            _Unwind_SetIP(context, (funcStart + landingPad));
             return _URC_INSTALL_CONTEXT;
         }
     }
-    
+
     /* No landing pad found, continue unwinding. */
     return _URC_CONTINUE_UNWIND;
 }




More information about the llvm-commits mailing list