@@ -101,13 +101,17 @@ struct YieldOnceCoroutine<ResultTy(ArgTys...)> {
101
101
102
102
#endif
103
103
104
+ SWIFT_BEGIN_DECLS
105
+
104
106
// / A standard routine, suitable for placement in the value witness
105
107
// / table, for copying an opaque POD object.
106
108
SWIFT_RUNTIME_EXPORT
107
109
OpaqueValue *swift_copyPOD (OpaqueValue *dest,
108
110
OpaqueValue *src,
109
111
const Metadata *self);
110
112
113
+ SWIFT_END_DECLS
114
+
111
115
template <>
112
116
inline void ValueWitnessTable::publishLayout (const TypeLayout &layout) {
113
117
size = layout.size ;
@@ -131,6 +135,8 @@ template <> inline bool ValueWitnessTable::checkIsComplete() const {
131
135
132
136
// Standard value-witness tables.
133
137
138
+ SWIFT_BEGIN_DECLS
139
+
134
140
#define BUILTIN_TYPE (Symbol, _ ) \
135
141
SWIFT_RUNTIME_EXPORT const ValueWitnessTable VALUE_WITNESS_SYM (Symbol);
136
142
#define BUILTIN_POINTER_TYPE (Symbol, _ ) \
@@ -166,6 +172,8 @@ const ValueWitnessTable VALUE_WITNESS_SYM(EMPTY_TUPLE_MANGLING); // ()
166
172
SWIFT_RUNTIME_EXPORT
167
173
const ValueWitnessTable METATYPE_VALUE_WITNESS_SYM (Bo); // Builtin.NativeObject.Type
168
174
175
+ SWIFT_END_DECLS
176
+
169
177
// / Return the value witnesses for unmanaged pointers.
170
178
static inline const ValueWitnessTable &getUnmanagedPointerValueWitnesses () {
171
179
#if __POINTER_WIDTH__ == 64
@@ -184,6 +192,8 @@ getUnmanagedPointerPointerValueWitnesses() {
184
192
185
193
using OpaqueMetadata = TargetOpaqueMetadata<InProcess>;
186
194
195
+ SWIFT_BEGIN_DECLS
196
+
187
197
// Standard POD opaque metadata.
188
198
// The "Int" metadata are used for arbitrary POD data with the
189
199
// matching characteristics.
@@ -209,11 +219,15 @@ SWIFT_RUNTIME_EXPORT
209
219
const
210
220
FullMetadata<ExistentialTypeMetadata> METADATA_SYM (ANYOBJECT_MANGLING);
211
221
222
+ SWIFT_END_DECLS
223
+
212
224
213
225
// / True if two context descriptors in the currently running program describe
214
226
// / the same context.
215
227
bool equalContexts (const ContextDescriptor *a, const ContextDescriptor *b);
216
228
229
+ SWIFT_BEGIN_DECLS
230
+
217
231
// / Determines whether two type context descriptors describe the same type
218
232
// / context.
219
233
// /
@@ -228,11 +242,15 @@ SWIFT_CC(swift)
228
242
bool swift_compareTypeContextDescriptors (const TypeContextDescriptor *lhs,
229
243
const TypeContextDescriptor *rhs);
230
244
245
+ SWIFT_END_DECLS
246
+
231
247
// / Compute the bounds of class metadata with a resilient superclass.
232
248
ClassMetadataBounds getResilientMetadataBounds (
233
249
const ClassDescriptor *descriptor);
234
250
int32_t getResilientImmediateMembersOffset (const ClassDescriptor *descriptor);
235
251
252
+ SWIFT_BEGIN_DECLS
253
+
236
254
// / Fetch a uniqued metadata object for a nominal type which requires
237
255
// / singleton metadata initialization.
238
256
SWIFT_RUNTIME_EXPORT SWIFT_CC (swift)
@@ -555,8 +573,12 @@ size_t swift_getTupleTypeLayout2(TypeLayout *tupleLayout,
555
573
const TypeLayout *elt0,
556
574
const TypeLayout *elt1);
557
575
576
+ SWIFT_END_DECLS
577
+
558
578
struct OffsetPair { size_t First; size_t Second; };
559
579
580
+ SWIFT_BEGIN_DECLS
581
+
560
582
// / Perform layout as if for a three-element tuple whose elements have
561
583
// / the given layouts.
562
584
// /
@@ -723,6 +745,8 @@ OpaqueValue *swift_assignExistentialWithCopy(OpaqueValue *dest,
723
745
const OpaqueValue *src,
724
746
const Metadata *type);
725
747
748
+ SWIFT_END_DECLS
749
+
726
750
// / Perform a copy-assignment from one existential container to another.
727
751
// / Both containers must be of the same existential type representable with no
728
752
// / witness tables.
@@ -828,6 +852,8 @@ inline constexpr unsigned swift_getFunctionPointerExtraInhabitantCount() {
828
852
std::string nameForMetadata (const Metadata *type,
829
853
bool qualified = true );
830
854
855
+ SWIFT_BEGIN_DECLS
856
+
831
857
// / Register a block of protocol records for dynamic lookup.
832
858
SWIFT_RUNTIME_EXPORT
833
859
void swift_registerProtocols (const ProtocolRecord *begin,
@@ -843,6 +869,8 @@ SWIFT_RUNTIME_EXPORT
843
869
void swift_registerTypeMetadataRecords (const TypeMetadataRecord *begin,
844
870
const TypeMetadataRecord *end);
845
871
872
+ SWIFT_END_DECLS
873
+
846
874
// / Return the superclass, if any. The result is nullptr for root
847
875
// / classes and class protocol types.
848
876
SWIFT_CC (swift)
@@ -862,6 +890,8 @@ void verifyMangledNameRoundtrip(const Metadata *metadata);
862
890
SWIFT_CC (swift) SWIFT_RUNTIME_STDLIB_API
863
891
const TypeContextDescriptor *swift_getTypeContextDescriptor (const Metadata *type);
864
892
893
+ SWIFT_BEGIN_DECLS
894
+
865
895
// Defined in KeyPath.swift in the standard library.
866
896
SWIFT_RUNTIME_EXPORT
867
897
const HeapObject *swift_getKeyPath (const void *pattern, const void *arguments);
@@ -900,6 +930,8 @@ void swift_enableDynamicReplacementScope(const DynamicReplacementScope *scope);
900
930
SWIFT_RUNTIME_EXPORT
901
931
void swift_disableDynamicReplacementScope (const DynamicReplacementScope *scope);
902
932
933
+ SWIFT_END_DECLS
934
+
903
935
#pragma clang diagnostic pop
904
936
905
937
} // end namespace swift
0 commit comments