[cfe-commits] [libcxxabi] r160933 - in /libcxxabi/trunk: CREDITS.TXT src/private_typeinfo.h

Howard Hinnant hhinnant at apple.com
Sun Jul 29 13:41:19 PDT 2012


Author: hhinnant
Date: Sun Jul 29 15:41:19 2012
New Revision: 160933

URL: http://llvm.org/viewvc/llvm-project?rev=160933&view=rev
Log:
Andrew Morrow: Mainline clang seems to have recently become more strict about the
consistent application of visibility attributes, which causes some new
breakage in libcxxabi:

In file included from src/libcxxabi/src/cxa_default_handlers.cpp:19:
src/libcxxabi/src/private_typeinfo.h:123:23: error: visibility does
not match previous declaration
class __attribute__ ((__visibility__(default))) __class_type_info
                     ^
src/libcxxabi/src/private_typeinfo.h:19:13: note: previous attribute is here
#pragma GCC visibility push(hidden)
           ^
1 error generated.

The forward declaration of __class_type_info is picking up hidden
visibility from the #pragma, which conflicts with the default
visibility applied when the class is later fully declared. I'm
assuming that the full declaration has it right (and that the
diagnostic is correct), so the attached patch applies the default
visibility attribute to the forward declaration.

Modified:
    libcxxabi/trunk/CREDITS.TXT
    libcxxabi/trunk/src/private_typeinfo.h

Modified: libcxxabi/trunk/CREDITS.TXT
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/CREDITS.TXT?rev=160933&r1=160932&r2=160933&view=diff
==============================================================================
--- libcxxabi/trunk/CREDITS.TXT (original)
+++ libcxxabi/trunk/CREDITS.TXT Sun Jul 29 15:41:19 2012
@@ -20,3 +20,7 @@
 
 N: Nick Kledzik
 E: kledzik at apple.com
+
+N: Andrew Morrow
+E: andrew.c.morrow at gmail.com
+D: Minor patches and fixes

Modified: libcxxabi/trunk/src/private_typeinfo.h
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/private_typeinfo.h?rev=160933&r1=160932&r2=160933&view=diff
==============================================================================
--- libcxxabi/trunk/src/private_typeinfo.h (original)
+++ libcxxabi/trunk/src/private_typeinfo.h Sun Jul 29 15:41:19 2012
@@ -70,7 +70,7 @@
     no
 };
 
-class __class_type_info;
+class __attribute__ ((__visibility__("default"))) __class_type_info;
 
 struct __dynamic_cast_info
 {





More information about the cfe-commits mailing list