|
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 C++ standard library function in (possibly-versioned) |
| 107 | +// namespace std; implied by STDBUILTIN |
104 | 108 | // FIXME: gcc has nonnull
|
105 | 109 |
|
106 | 110 | #if defined(BUILTIN) && !defined(LIBBUILTIN)
|
|
111 | 115 | # define LANGBUILTIN(ID, TYPE, ATTRS, BUILTIN_LANG) BUILTIN(ID, TYPE, ATTRS)
|
112 | 116 | #endif
|
113 | 117 |
|
| 118 | +#if defined(BUILTIN) && !defined(STDBUILTIN) |
| 119 | +# define STDBUILTIN(ID, TYPE, ATTRS, HEADER) LIBBUILTIN(ID, TYPE, "zf" ATTRS, HEADER, CXX_LANG) |
| 120 | +#endif |
| 121 | + |
114 | 122 | // Standard libc/libm functions:
|
115 | 123 | BUILTIN(__builtin_atan2 , "ddd" , "Fne")
|
116 | 124 | BUILTIN(__builtin_atan2f, "fff" , "Fne")
|
@@ -919,7 +927,7 @@ LANGBUILTIN(__exception_info, "v*", "n", ALL_MS_LANGUAGES)
|
919 | 927 | LANGBUILTIN(_exception_info, "v*", "n", ALL_MS_LANGUAGES)
|
920 | 928 | LANGBUILTIN(__abnormal_termination, "i", "n", ALL_MS_LANGUAGES)
|
921 | 929 | LANGBUILTIN(_abnormal_termination, "i", "n", ALL_MS_LANGUAGES)
|
922 |
| -LANGBUILTIN(__GetExceptionInfo, "v*.", "ntu", ALL_MS_LANGUAGES) |
| 930 | +LANGBUILTIN(__GetExceptionInfo, "v*.", "zntu", ALL_MS_LANGUAGES) |
923 | 931 | LANGBUILTIN(_InterlockedAnd8, "ccD*c", "n", ALL_MS_LANGUAGES)
|
924 | 932 | LANGBUILTIN(_InterlockedAnd16, "ssD*s", "n", ALL_MS_LANGUAGES)
|
925 | 933 | LANGBUILTIN(_InterlockedAnd, "NiNiD*Ni", "n", ALL_MS_LANGUAGES)
|
@@ -1543,6 +1551,11 @@ LIBBUILTIN(_Block_object_assign, "vv*vC*iC", "f", "Blocks.h", ALL_LANGUAGES)
|
1543 | 1551 | LIBBUILTIN(_Block_object_dispose, "vvC*iC", "f", "Blocks.h", ALL_LANGUAGES)
|
1544 | 1552 | // FIXME: Also declare NSConcreteGlobalBlock and NSConcreteStackBlock.
|
1545 | 1553 |
|
| 1554 | +// C++11 |
| 1555 | +STDBUILTIN(move, "v&v&", "ncTh", "utility") |
| 1556 | +STDBUILTIN(move_if_noexcept, "v&v&", "ncTh", "utility") |
| 1557 | +STDBUILTIN(forward, "v&v&", "ncTh", "utility") |
| 1558 | + |
1546 | 1559 | // Annotation function
|
1547 | 1560 | BUILTIN(__builtin_annotation, "v.", "tn")
|
1548 | 1561 |
|
|
0 commit comments