Commit Graph

9 Commits

Author SHA1 Message Date
Ranjeet Singh ef6e672d04 [libcxxabi] Clean up macro usage.
Convention in libcxxabi is to use !defined(FOO) not !FOO.

Differential Revision: https://reviews.llvm.org/D30459

llvm-svn: 296612
2017-03-01 11:42:01 +00:00
Shoaib Meenai fe989a9817 [libc++abi] Clean up visibility
Use the libc++abi visibility macros instead of pragmas or using
visibility attributes directly. Clean up redundant attributes on
definitions (where the declarations already have visibility attributes
applied, from either libc++ or libc++abi headers).

Introduce _LIBCXXABI_WEAK as a drive-by cleanup, which matches the
semantics of _LIBCPP_WEAK.

No functional change. Tested by building on Linux before and after this
change and verifying that the list of exported symbols is identical.

Differential Revision: https://reviews.llvm.org/D26949

llvm-svn: 296576
2017-03-01 03:55:57 +00:00
Eric Fiselier 71e329266a Fix non-reserved macro names LIBCXXABI_NORETURN and LIBCXXABI_ARM_EHABI.
This patch adds the required leading underscore to those macros.

llvm-svn: 296567
2017-03-01 02:23:54 +00:00
Shoaib Meenai 1bc40a8e2d [libc++abi] Add _LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS
It's useful to be able to disable visibility annotations entirely; for
example, if we're building libc++abi static to include in another library,
and we don't want any libc++abi functions getting exported out of that
library. This is a generalization of _LIBCXXABI_DISABLE_DLL_IMPORT_EXPORT.

Differential Revision: https://reviews.llvm.org/D26950

llvm-svn: 288692
2016-12-05 19:42:11 +00:00
Shoaib Meenai 88c6acfedc [libc++abi] Default to DLL annotations on Windows
`__declspec(dllexport)` and `__declspec(dllimport)` should only be used
when building libc++abi as a DLL, but that's the more common use case,
so default to adding the annotations and add an option to opt out.

Similar to r282449, which made the corresponding change for libc++.

Differential Revision: https://reviews.llvm.org/D24945

llvm-svn: 282470
2016-09-27 03:44:09 +00:00
Saleem Abdulrasool 18ef564c8b libc++abi: build with -fvisibility=hidden
Enable building libc++abi with hidden visibility by default.  The ABI mandated
interfaces (and a few extra) are already set up to be externally visible.  This
allows us to ensure that any implementation details are not leaked.

llvm-svn: 270816
2016-05-26 02:12:20 +00:00
Saleem Abdulrasool 12315edf03 ibc++abi: mark visibility
Mark functions and types with the appropriate visibility.  This is particularly
useful for environments which explicitly indicate origin of functions (Windows).
This aids in generating libc++abi as a DSO which exposes only the public
interfaces.

llvm-svn: 254691
2015-12-04 02:14:58 +00:00
Saleem Abdulrasool 242d67b687 c++abi: whitespace adjustment
Cleanup some code with clang-format to make the following change easier to
identify material difference.  NFC.

llvm-svn: 254690
2015-12-04 02:14:41 +00:00
Dan Albert f25c866ba6 [libcxxabi] Fix -Werror build for 32-bit non-ARM.
Summary:
The inclusion of Unwind-EHABI.h was insufficiently guarded
(LIBCXXABI_ARM_EHABI was beign checked without ever being defined).

Move the check into the header file itself, add the check to the
source file, and clean up the existing checks.

LIBCXXABI_ARM_EHABI didn't have a canonical defintion; it was
duplicated across cxxabi.h, libunwind.h, and unwind.h. Move the
definition into __cxxabi_config.h and clean up the old cruft (note: we
will have to ship this header).

There are also a few drive-by formatting/whitespace cleanups.

Reviewers: jroelofs, thakis, compnerd

Reviewed By: compnerd

Subscribers: compnerd, aemerson, cfe-commits

Differential Revision: http://reviews.llvm.org/D7419

llvm-svn: 228363
2015-02-05 23:55:15 +00:00