summaryrefslogtreecommitdiff
path: root/libcxxabi/include
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2014-10-13 21:01:30 +0000
committerDan Albert <danalbert@google.com>2014-10-13 21:01:30 +0000
commitb44ad60835fd3663e135ed231a5791f4efc21861 (patch)
tree91eed935fdebf49f3d5faafc894d2ce5e38216b4 /libcxxabi/include
parent049d21caea4cb66bfda771fa8f4e21b88dfd1364 (diff)
downloadllvm-b44ad60835fd3663e135ed231a5791f4efc21861.tar.gz
Correctly export _Unwind_[GS]et(GR|IP) for EHABI.
These need to have normal linkage instead of being static inline as many libraries expect to be able to declare these and have the linker find them rather than needing to include the header. http://mentorembedded.github.io/cxx-abi/abi-eh.html Also clean up some warnings while I'm here. Reviewers: jroelofs, kledzik Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5754 llvm-svn: 219629
Diffstat (limited to 'libcxxabi/include')
-rw-r--r--libcxxabi/include/unwind.h26
1 files changed, 1 insertions, 25 deletions
diff --git a/libcxxabi/include/unwind.h b/libcxxabi/include/unwind.h
index dd82bc9125d2..1e517b68bdce 100644
--- a/libcxxabi/include/unwind.h
+++ b/libcxxabi/include/unwind.h
@@ -206,37 +206,13 @@ extern _Unwind_VRS_Result
_Unwind_VRS_Pop(_Unwind_Context *context, _Unwind_VRS_RegClass regclass,
uint32_t discriminator,
_Unwind_VRS_DataRepresentation representation);
+#endif
-static inline uintptr_t _Unwind_GetGR(struct _Unwind_Context* context,
- int index) {
- uintptr_t value = 0;
- _Unwind_VRS_Get(context, _UVRSC_CORE, (uint32_t)index, _UVRSD_UINT32, &value);
- return value;
-}
-
-static inline void _Unwind_SetGR(struct _Unwind_Context* context, int index,
- uintptr_t new_value) {
- _Unwind_VRS_Set(context, _UVRSC_CORE, (uint32_t)index,
- _UVRSD_UINT32, &new_value);
-}
-
-static inline uintptr_t _Unwind_GetIP(struct _Unwind_Context* context) {
- // remove the thumb-bit before returning
- return (_Unwind_GetGR(context, 15) & (~(uintptr_t)0x1));
-}
-
-static inline void _Unwind_SetIP(struct _Unwind_Context* context,
- uintptr_t new_value) {
- uintptr_t thumb_bit = _Unwind_GetGR(context, 15) & ((uintptr_t)0x1);
- _Unwind_SetGR(context, 15, new_value | thumb_bit);
-}
-#else
extern uintptr_t _Unwind_GetGR(struct _Unwind_Context *context, int index);
extern void _Unwind_SetGR(struct _Unwind_Context *context, int index,
uintptr_t new_value);
extern uintptr_t _Unwind_GetIP(struct _Unwind_Context *context);
extern void _Unwind_SetIP(struct _Unwind_Context *, uintptr_t new_value);
-#endif
extern uintptr_t _Unwind_GetRegionStart(struct _Unwind_Context *context);
extern uintptr_t