[compiler-rt] r347101 - Cast _Unwind_GetIP() and _Unwind_GetRegionStart() to uintptr_t
Kamil Rytarowski via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 16 14:15:10 PST 2018
Author: kamil
Date: Fri Nov 16 14:15:09 2018
New Revision: 347101
URL: http://llvm.org/viewvc/llvm-project?rev=347101&view=rev
Log:
Cast _Unwind_GetIP() and _Unwind_GetRegionStart() to uintptr_t
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=347101&r1=347100&r2=347101&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:15:09 2018
@@ -206,8 +206,8 @@ __gcc_personality_v0(int version, _Unwin
if ( lsda == (uint8_t*) 0 )
return continueUnwind(exceptionObject, context);
- uintptr_t pc = _Unwind_GetIP(context)-1;
- uintptr_t funcStart = _Unwind_GetRegionStart(context);
+ uintptr_t pc = (uintptr_t)_Unwind_GetIP(context)-1;
+ uintptr_t funcStart = (uintptr_t)_Unwind_GetRegionStart(context);
uintptr_t pcOffset = pc - funcStart;
/* Parse LSDA header. */
@@ -249,4 +249,3 @@ __gcc_personality_v0(int version, _Unwin
/* No landing pad found, continue unwinding. */
return continueUnwind(exceptionObject, context);
}
-
More information about the llvm-commits
mailing list