File tree Expand file tree Collapse file tree 5 files changed +80
-12
lines changed Expand file tree Collapse file tree 5 files changed +80
-12
lines changed Original file line number Diff line number Diff line change @@ -944,6 +944,7 @@ set(files
944
944
__vector/vector_bool.h
945
945
__vector/vector_bool_formatter.h
946
946
__verbose_abort
947
+ __verbose_trap
947
948
algorithm
948
949
any
949
950
array
@@ -1569,6 +1570,7 @@ set(files
1569
1570
__cxx03/__utility/unreachable.h
1570
1571
__cxx03/__variant/monostate.h
1571
1572
__cxx03/__verbose_abort
1573
+ __cxx03/__verbose_trap
1572
1574
__cxx03/algorithm
1573
1575
__cxx03/array
1574
1576
__cxx03/atomic
Original file line number Diff line number Diff line change
1
+ // -*- C++ -*-
2
+ // ===----------------------------------------------------------------------===//
3
+ //
4
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5
+ // See https://llvm.org/LICENSE.txt for license information.
6
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7
+ //
8
+ // ===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCPP___CXX03___VERBOSE_TRAP
11
+ #define _LIBCPP___CXX03___VERBOSE_TRAP
12
+
13
+ #include < __cxx03/__config>
14
+
15
+ #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
16
+ # pragma GCC system_header
17
+ #endif
18
+
19
+ _LIBCPP_BEGIN_NAMESPACE_STD
20
+
21
+ #if __has_builtin(__builtin_verbose_trap)
22
+ // AppleClang shipped a slightly different version of __builtin_verbose_trap from the upstream
23
+ // version before upstream Clang actually got the builtin.
24
+ // TODO: Remove once AppleClang supports the two-arguments version of the builtin.
25
+ # if defined(_LIBCPP_APPLE_CLANG_VER) && _LIBCPP_APPLE_CLANG_VER < 1700
26
+ # define _LIBCPP_VERBOSE_TRAP (message ) __builtin_verbose_trap(message)
27
+ # else
28
+ # define _LIBCPP_VERBOSE_TRAP (message ) __builtin_verbose_trap(" libc++" , message)
29
+ # endif
30
+ #else
31
+ # define _LIBCPP_VERBOSE_TRAP (message ) ((void )message, __builtin_trap())
32
+ #endif
33
+
34
+ _LIBCPP_END_NAMESPACE_STD
35
+
36
+ #endif // _LIBCPP___CXX03___VERBOSE_TRAP
Original file line number Diff line number Diff line change
1
+ // -*- C++ -*-
2
+ // ===----------------------------------------------------------------------===//
3
+ //
4
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5
+ // See https://llvm.org/LICENSE.txt for license information.
6
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7
+ //
8
+ // ===----------------------------------------------------------------------===//
9
+
10
+ #ifndef _LIBCPP___VERBOSE_TRAP
11
+ #define _LIBCPP___VERBOSE_TRAP
12
+
13
+ #include < __config>
14
+
15
+ #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
16
+ # pragma GCC system_header
17
+ #endif
18
+
19
+ _LIBCPP_BEGIN_NAMESPACE_STD
20
+
21
+ #if __has_builtin(__builtin_verbose_trap)
22
+ // AppleClang shipped a slightly different version of __builtin_verbose_trap from the upstream
23
+ // version before upstream Clang actually got the builtin.
24
+ // TODO: Remove once AppleClang supports the two-arguments version of the builtin.
25
+ # if defined(_LIBCPP_APPLE_CLANG_VER) && _LIBCPP_APPLE_CLANG_VER < 1700
26
+ # define _LIBCPP_VERBOSE_TRAP (message ) __builtin_verbose_trap(message)
27
+ # else
28
+ # define _LIBCPP_VERBOSE_TRAP (message ) __builtin_verbose_trap(" libc++" , message)
29
+ # endif
30
+ #else
31
+ # define _LIBCPP_VERBOSE_TRAP (message ) ((void )message, __builtin_trap())
32
+ #endif
33
+
34
+ _LIBCPP_END_NAMESPACE_STD
35
+
36
+ #endif // _LIBCPP___VERBOSE_TRAP
Original file line number Diff line number Diff line change @@ -2356,6 +2356,9 @@ module std [system] {
2356
2356
module verbose_abort {
2357
2357
header "__verbose_abort"
2358
2358
}
2359
+ module verbose_trap {
2360
+ header "__verbose_trap"
2361
+ }
2359
2362
module internal_assert {
2360
2363
header "__assert"
2361
2364
export *
Original file line number Diff line number Diff line change 13
13
#if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
14
14
# include < __cxx03/__config>
15
15
# include < __cxx03/__verbose_abort>
16
+ # include < __cxx03/__verbose_trap>
16
17
#else
17
18
# include < __config>
18
19
# include < __verbose_abort>
20
+ # include < __verbose_trap>
19
21
#endif
20
22
21
23
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
28
30
29
31
#else
30
32
31
- # if __has_builtin(__builtin_verbose_trap)
32
- // AppleClang shipped a slightly different version of __builtin_verbose_trap from the upstream
33
- // version before upstream Clang actually got the builtin.
34
- // TODO: Remove once AppleClang supports the two-arguments version of the builtin.
35
- # if defined(_LIBCPP_APPLE_CLANG_VER) && _LIBCPP_APPLE_CLANG_VER < 1700
36
- # define _LIBCPP_ASSERTION_HANDLER (message ) __builtin_verbose_trap(message)
37
- # else
38
- # define _LIBCPP_ASSERTION_HANDLER (message ) __builtin_verbose_trap(" libc++" , message)
39
- # endif
40
- # else
41
- # define _LIBCPP_ASSERTION_HANDLER (message ) ((void )message, __builtin_trap())
42
- # endif
33
+ # define _LIBCPP_ASSERTION_HANDLER (message ) _LIBCPP_VERBOSE_TRAP(message)
43
34
44
35
#endif // _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_DEBUG
45
36
You can’t perform that action at this time.
0 commit comments