[cfe-commits] r171991 - /cfe/trunk/lib/Headers/unwind.h

Benjamin Kramer benny.kra at googlemail.com
Wed Jan 9 11:54:57 PST 2013


Author: d0k
Date: Wed Jan  9 13:54:57 2013
New Revision: 171991

URL: http://llvm.org/viewvc/llvm-project?rev=171991&view=rev
Log:
unwind.h: Add include guards and don't mess with visibility if HIDE_EXPORTS is specified.

For GCC compatibility.

Modified:
    cfe/trunk/lib/Headers/unwind.h

Modified: cfe/trunk/lib/Headers/unwind.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/unwind.h?rev=171991&r1=171990&r2=171991&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/unwind.h (original)
+++ cfe/trunk/lib/Headers/unwind.h Wed Jan  9 13:54:57 2013
@@ -23,6 +23,9 @@
 
 /* See "Data Definitions for libgcc_s" in the Linux Standard Base.*/
 
+#ifndef __CLANG_UNWIND_H
+#define __CLANG_UNWIND_H
+
 #if __has_include_next(<unwind.h>)
 /* Darwin and libunwind provide an unwind.h. If that's available, use
  * it. libunwind wraps some of its definitions in #ifdef _GNU_SOURCE,
@@ -59,7 +62,9 @@
 /* It is a bit strange for a header to play with the visibility of the
    symbols it declares, but this matches gcc's behavior and some programs
    depend on it */
+#ifndef HIDE_EXPORTS
 #pragma GCC visibility push(default)
+#endif
 
 struct _Unwind_Context;
 typedef enum {
@@ -115,10 +120,14 @@
 typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn)(struct _Unwind_Context*, void*);
 _Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn, void*);
 
+#ifndef HIDE_EXPORTS
 #pragma GCC visibility pop
+#endif
 
 #ifdef __cplusplus
 }
 #endif
 
 #endif
+
+#endif /* __CLANG_UNWIND_H */





More information about the cfe-commits mailing list