|
81 | 81 | // builtin even if type doesn't match signature, and don't warn if we
|
82 | 82 | // can't be sure the type is right
|
83 | 83 | // F -> this is a libc/libm function with a '__builtin_' prefix added.
|
84 |
| -// f -> this is a libc/libm function without the '__builtin_' prefix. |
| 84 | +// f -> this is a libc/libm function without a '__builtin_' prefix, or with |
| 85 | +// 'z', a C++ standard library function in namespace std::. This builtin |
| 86 | +// is disableable by '-fno-builtin-foo' / '-fno-builtin-std-foo'. |
85 | 87 | // h -> this function requires a specific header or an explicit declaration.
|
86 | 88 | // i -> this is a runtime library implemented function without the
|
87 | 89 | // '__builtin_' prefix. It will be implemented in compiler-rt or libgcc.
|
|
101 | 103 | // V:N: -> requires vectors of at least N bits to be legal
|
102 | 104 | // C<N,M_0,...,M_k> -> callback behavior: argument N is called with argument
|
103 | 105 | // M_0, ..., M_k as payload
|
| 106 | +// z -> this is a function in (possibly-versioned) namespace std |
104 | 107 | // FIXME: gcc has nonnull
|
105 | 108 |
|
106 | 109 | #if defined(BUILTIN) && !defined(LIBBUILTIN)
|
@@ -919,7 +922,7 @@ LANGBUILTIN(__exception_info, "v*", "n", ALL_MS_LANGUAGES)
|
919 | 922 | LANGBUILTIN(_exception_info, "v*", "n", ALL_MS_LANGUAGES)
|
920 | 923 | LANGBUILTIN(__abnormal_termination, "i", "n", ALL_MS_LANGUAGES)
|
921 | 924 | LANGBUILTIN(_abnormal_termination, "i", "n", ALL_MS_LANGUAGES)
|
922 |
| -LANGBUILTIN(__GetExceptionInfo, "v*.", "ntu", ALL_MS_LANGUAGES) |
| 925 | +LANGBUILTIN(__GetExceptionInfo, "v*.", "zntu", ALL_MS_LANGUAGES) |
923 | 926 | LANGBUILTIN(_InterlockedAnd8, "ccD*c", "n", ALL_MS_LANGUAGES)
|
924 | 927 | LANGBUILTIN(_InterlockedAnd16, "ssD*s", "n", ALL_MS_LANGUAGES)
|
925 | 928 | LANGBUILTIN(_InterlockedAnd, "NiNiD*Ni", "n", ALL_MS_LANGUAGES)
|
@@ -1543,6 +1546,15 @@ LIBBUILTIN(_Block_object_assign, "vv*vC*iC", "f", "Blocks.h", ALL_LANGUAGES)
|
1543 | 1546 | LIBBUILTIN(_Block_object_dispose, "vvC*iC", "f", "Blocks.h", ALL_LANGUAGES)
|
1544 | 1547 | // FIXME: Also declare NSConcreteGlobalBlock and NSConcreteStackBlock.
|
1545 | 1548 |
|
| 1549 | +// C++ standard library builtins in namespace 'std'. |
| 1550 | +LIBBUILTIN(addressof, "v*v&", "zfncTh", "memory", CXX_LANG) |
| 1551 | +// Synonym for addressof used internally by libstdc++. |
| 1552 | +LANGBUILTIN(__addressof, "v*v&", "zfncT", CXX_LANG) |
| 1553 | +LIBBUILTIN(as_const, "v&v&", "zfncTh", "utility", CXX_LANG) |
| 1554 | +LIBBUILTIN(forward, "v&v&", "zfncTh", "utility", CXX_LANG) |
| 1555 | +LIBBUILTIN(move, "v&v&", "zfncTh", "utility", CXX_LANG) |
| 1556 | +LIBBUILTIN(move_if_noexcept, "v&v&", "zfncTh", "utility", CXX_LANG) |
| 1557 | + |
1546 | 1558 | // Annotation function
|
1547 | 1559 | BUILTIN(__builtin_annotation, "v.", "tn")
|
1548 | 1560 |
|
|
0 commit comments