[cfe-commits] [patch][libcxxabi] Apply consistent visibility for __class_type_info in private_typeinfo.h

Andrew C. Morrow andrew.c.morrow at gmail.com
Sun Jul 29 11:45:40 PDT 2012


Hi -

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.

The patch also adds me to CREDITS.TXT.

Thanks,
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libcxxabi.class_type_info.visibility.patch
Type: application/octet-stream
Size: 604 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120729/deb8708e/attachment.obj>


More information about the cfe-commits mailing list