diff options
author | Asiri Rathnayake <asiri.rathnayake@arm.com> | 2016-05-31 12:01:32 +0000 |
---|---|---|
committer | Asiri Rathnayake <asiri.rathnayake@arm.com> | 2016-05-31 12:01:32 +0000 |
commit | 4174e8b402ba05e3b3e003b1066f1eae6fbeb24b (patch) | |
tree | 00a63addfb8fc122d9d3f275d22d2541ea4a63e2 /test/test_guard.pass.cpp | |
parent | 436072f52ff05d69f626a9c7a309a1464758f129 (diff) |
[libcxxabi] Introduce a -fno-exceptions libc++abi libary variant
Currently there is only support for a -fno-exceptions libc++ build. This is
problematic for functions such as std::terminate() which are defined in
libc++abi and using any of those functions throws away most of the benefits
of using -fno-exceptions (code-size). This patch introduces a -fno-exceptions
libc++abi build to address this issue.
This new variant of libc++abi cannot be linked against any with-exceptions
code as some symbols necessary for handling exceptions are missing in this
library.
Differential revision: http://reviews.llvm.org/D20677
Reviewers: EricWF, mclow.lists, bcraig
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@271267 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/test_guard.pass.cpp')
-rw-r--r-- | test/test_guard.pass.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_guard.pass.cpp b/test/test_guard.pass.cpp index 41ff794..9b0c2d5 100644 --- a/test/test_guard.pass.cpp +++ b/test/test_guard.pass.cpp @@ -41,6 +41,7 @@ namespace test1 { // When initialization fails, ensure that we try to initialize it again next // time. namespace test2 { +#ifndef LIBCXXABI_HAS_NO_EXCEPTIONS static int run_count = 0; int increment() { ++run_count; @@ -58,6 +59,9 @@ namespace test2 { helper(); assert(run_count == 2); } +#else + void test() {} +#endif } // Check that we can initialize a second value while initializing a first. |