[compiler-rt] r347102 - Cast the 2nd argument of _Unwind_SetIP() to _Unwind_Ptr

Kamil Rytarowski via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 16 14:17:36 PST 2018


Author: kamil
Date: Fri Nov 16 14:17:36 2018
New Revision: 347102

URL: http://llvm.org/viewvc/llvm-project?rev=347102&view=rev
Log:
Cast the 2nd argument of _Unwind_SetIP() to _Unwind_Ptr

This modification is require for NetBSD with GCC, as there is a
custom unwind.h header implementation with different types.

No functional change intended for others.

Cherry-picked chunk from D33878.

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=347102&r1=347101&r2=347102&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/gcc_personality_v0.c (original)
+++ compiler-rt/trunk/lib/builtins/gcc_personality_v0.c Fri Nov 16 14:17:36 2018
@@ -241,7 +241,7 @@ __gcc_personality_v0(int version, _Unwin
             _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, (_Unwind_Ptr)(funcStart + landingPad));
             return _URC_INSTALL_CONTEXT;
         }
     }




More information about the llvm-commits mailing list