summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2015-02-05 01:33:15 +0000
committerDan Albert <danalbert@google.com>2015-02-05 01:33:15 +0000
commita1fce46063c99e307594236c55004b4e5b62243f (patch)
tree8833e23684c15dbc85c1fb368a7dd628a80a4dc2 /include
parent3cbecdfb17187900a42286372a094055a3a87d57 (diff)
Enable -Wundef.
The problem that caused the need for http://reviews.llvm.org/D7419 was caused by testing the value of something that was undefined. This should prevent that in the future. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@228257 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/cxxabi.h2
-rw-r--r--include/libunwind.h10
-rw-r--r--include/unwind.h8
3 files changed, 10 insertions, 10 deletions
diff --git a/include/cxxabi.h b/include/cxxabi.h
index 2614327..ae75f86 100644
--- a/include/cxxabi.h
+++ b/include/cxxabi.h
@@ -77,7 +77,7 @@ extern LIBCXXABI_NORETURN void __cxa_pure_virtual(void);
extern LIBCXXABI_NORETURN void __cxa_deleted_virtual(void);
// 3.3.2 One-time Construction API
-#if __arm__
+#ifdef __arm__
extern int __cxa_guard_acquire(uint32_t*);
extern void __cxa_guard_release(uint32_t*);
extern void __cxa_guard_abort(uint32_t*);
diff --git a/include/libunwind.h b/include/libunwind.h
index 448d86a..9c69551 100644
--- a/include/libunwind.h
+++ b/include/libunwind.h
@@ -25,9 +25,9 @@
#define LIBCXXABI_ARM_EHABI 0
#endif
-#if __APPLE__
+#ifdef __APPLE__
#include <Availability.h>
- #if __arm__
+ #ifdef __arm__
#define LIBUNWIND_AVAIL __attribute__((unavailable))
#else
#define LIBUNWIND_AVAIL __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_5_0)
@@ -100,7 +100,7 @@ extern int unw_set_reg(unw_cursor_t *, unw_regnum_t, unw_word_t) LIBUNWIND_AVAIL
extern int unw_set_fpreg(unw_cursor_t *, unw_regnum_t, unw_fpreg_t) LIBUNWIND_AVAIL;
extern int unw_resume(unw_cursor_t *) LIBUNWIND_AVAIL;
-#if __arm__
+#ifdef __arm__
/* Save VFP registers in FSTMX format (instead of FSTMD). */
extern void unw_save_vfp_as_X(unw_cursor_t *) LIBUNWIND_AVAIL;
#endif
@@ -113,7 +113,7 @@ extern int unw_is_signal_frame(unw_cursor_t *) LIBUNWIND_AVAIL;
extern int unw_get_proc_name(unw_cursor_t *, char *, size_t, unw_word_t *) LIBUNWIND_AVAIL;
//extern int unw_get_save_loc(unw_cursor_t*, int, unw_save_loc_t*);
-#if UNW_REMOTE
+#ifdef UNW_REMOTE
/*
* Mac OS X "remote" API for unwinding other processes on same machine
*
@@ -122,7 +122,7 @@ extern unw_addr_space_t unw_local_addr_space;
extern unw_addr_space_t unw_create_addr_space_for_task(task_t);
extern void unw_destroy_addr_space(unw_addr_space_t);
extern int unw_init_remote_thread(unw_cursor_t *, unw_addr_space_t, thread_t *);
-#endif
+#endif /* UNW_REMOTE */
/*
* traditional libuwind "remote" API
diff --git a/include/unwind.h b/include/unwind.h
index 02cda67..52e6304 100644
--- a/include/unwind.h
+++ b/include/unwind.h
@@ -159,7 +159,7 @@ extern "C" {
//
// The following are the base functions documented by the C++ ABI
//
-#if __USING_SJLJ_EXCEPTIONS__
+#ifdef __USING_SJLJ_EXCEPTIONS__
extern _Unwind_Reason_Code
_Unwind_SjLj_RaiseException(_Unwind_Exception *exception_object);
extern void _Unwind_SjLj_Resume(_Unwind_Exception *exception_object);
@@ -245,7 +245,7 @@ extern void _Unwind_SetIP(struct _Unwind_Context *, uintptr_t new_value);
extern uintptr_t _Unwind_GetRegionStart(struct _Unwind_Context *context);
extern uintptr_t
_Unwind_GetLanguageSpecificData(struct _Unwind_Context *context);
-#if __USING_SJLJ_EXCEPTIONS__
+#ifdef __USING_SJLJ_EXCEPTIONS__
extern _Unwind_Reason_Code
_Unwind_SjLj_ForcedUnwind(_Unwind_Exception *exception_object,
_Unwind_Stop_Fn stop, void *stop_parameter);
@@ -255,7 +255,7 @@ extern _Unwind_Reason_Code
_Unwind_Stop_Fn stop, void *stop_parameter);
#endif
-#if __USING_SJLJ_EXCEPTIONS__
+#ifdef __USING_SJLJ_EXCEPTIONS__
typedef struct _Unwind_FunctionContext *_Unwind_FunctionContext_t;
extern void _Unwind_SjLj_Register(_Unwind_FunctionContext_t fc);
extern void _Unwind_SjLj_Unregister(_Unwind_FunctionContext_t fc);
@@ -268,7 +268,7 @@ extern void _Unwind_SjLj_Unregister(_Unwind_FunctionContext_t fc);
//
// called by __cxa_rethrow().
//
-#if __USING_SJLJ_EXCEPTIONS__
+#ifdef __USING_SJLJ_EXCEPTIONS__
extern _Unwind_Reason_Code
_Unwind_SjLj_Resume_or_Rethrow(_Unwind_Exception *exception_object);
#else