|
17 | 17 |
|
18 | 18 | /// #define OVERRIDE(name, ret, attrs, namespace, typedArgs, namedArgs)
|
19 | 19 | /// Provides information about an overridable function.
|
20 |
| -/// - name is the name of the function, without any leading swift_ or namespace. |
| 20 | +/// - name is the name of the function, without any leading swift_ or |
| 21 | +/// namespace. |
21 | 22 | /// - ret is the return type of the function.
|
22 | 23 | /// - attrs is the attributes, if any, applied to the function definition.
|
23 |
| -/// - namespace is the namespace, if any, the function is in, including a trailing :: |
24 |
| -/// - typedArgs is the argument list, including types, surrounded by parentheses |
25 |
| -/// - namedArgs is the list of argument names, with no types, surrounded by parentheses |
| 24 | +/// - namespace is the namespace, if any, the function is in, including a |
| 25 | +/// trailing :: |
| 26 | +/// - typedArgs is the argument list, including types, surrounded by |
| 27 | +/// parentheses |
| 28 | +/// - namedArgs is the list of argument names, with no types, surrounded by |
| 29 | +/// parentheses |
26 | 30 | ///
|
27 |
| -/// The entries are organized by group. A user may define OVERRIDE to get all entries, |
28 |
| -/// or define one or more of OVERRIDE_METADATALOOKUP, OVERRIDE_CASTING, OVERRIDE_OBJC, |
29 |
| -/// OVERRIDE_FOREIGN, or OVERRIDE_PROTOCOLCONFORMANCE to get only those entries. |
| 31 | +/// The entries are organized by group. A user may define OVERRIDE to get all |
| 32 | +/// entries, or define one or more of OVERRIDE_METADATALOOKUP, OVERRIDE_CASTING, |
| 33 | +/// OVERRIDE_OBJC, OVERRIDE_FOREIGN, OVERRIDE_PROTOCOLCONFORMANCE, |
| 34 | +/// and OVERRIDE_KEYPATH to get only those entries. |
30 | 35 |
|
31 | 36 | // NOTE: this file is used to build the definition of OverrideSection in
|
32 | 37 | // CompatibilityOverride.cpp, which is part of the ABI. Do not move or remove entries
|
|
38 | 43 | # define OVERRIDE_OBJC OVERRIDE
|
39 | 44 | # define OVERRIDE_FOREIGN OVERRIDE
|
40 | 45 | # define OVERRIDE_PROTOCOLCONFORMANCE OVERRIDE
|
| 46 | +# define OVERRIDE_KEYPATH OVERRIDE |
41 | 47 | #else
|
42 | 48 | # ifndef OVERRIDE_METADATALOOKUP
|
43 | 49 | # define OVERRIDE_METADATALOOKUP(...)
|
|
54 | 60 | # ifndef OVERRIDE_PROTOCOLCONFORMANCE
|
55 | 61 | # define OVERRIDE_PROTOCOLCONFORMANCE(...)
|
56 | 62 | # endif
|
| 63 | +# ifndef OVERRIDE_KEYPATH |
| 64 | +# define OVERRIDE_KEYPATH(...) |
| 65 | +# endif |
57 | 66 | #endif
|
58 | 67 |
|
59 | 68 | OVERRIDE_METADATALOOKUP(getTypeByMangledName, const Metadata *,
|
@@ -127,6 +136,10 @@ OVERRIDE_PROTOCOLCONFORMANCE(conformsToProtocol, const WitnessTable *, , swift::
|
127 | 136 | const ProtocolDescriptor *protocol),
|
128 | 137 | (type, protocol))
|
129 | 138 |
|
| 139 | +OVERRIDE_KEYPATH(getKeyPath, const HeapObject *, , swift::, |
| 140 | + (const void *pattern, const void *arguments), |
| 141 | + (pattern, arguments)) |
| 142 | + |
130 | 143 | #if SWIFT_OBJC_INTEROP
|
131 | 144 |
|
132 | 145 | OVERRIDE_OBJC(dynamicCastObjCClass, const void *, , swift::,
|
@@ -169,3 +182,4 @@ OVERRIDE_FOREIGN(dynamicCastForeignClassUnconditional, const void *, , swift::,
|
169 | 182 | #undef OVERRIDE_OBJC
|
170 | 183 | #undef OVERRIDE_FOREIGN
|
171 | 184 | #undef OVERRIDE_PROTOCOLCONFORMANCE
|
| 185 | +#undef OVERRIDE_KEYPATH |
0 commit comments