Skip to content

Commit ed71c20

Browse files
authored
Merge pull request #78141 from compnerd/declarations
runtime: address a declaration FIXME
2 parents 82d7260 + b1b8b46 commit ed71c20

File tree

1 file changed

+12
-28
lines changed

1 file changed

+12
-28
lines changed

include/swift/Runtime/Metadata.h

+12-28
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,6 @@ struct YieldOnceResult {
5959
ResultTy YieldValue;
6060
};
6161

62-
template <class FnTy>
63-
struct YieldOnceCoroutine;
64-
65-
/// A template which generates the type of the ramp function of a
66-
/// yield-once coroutine.
67-
template <class ResultTy, class... ArgTys>
68-
struct YieldOnceCoroutine<ResultTy(ArgTys...)> {
69-
using type =
70-
SWIFT_CC(swift) YieldOnceResult<ResultTy> (YieldOnceBuffer *buffer,
71-
ArgTys...);
72-
};
73-
7462
#if SWIFT_OBJC_INTEROP
7563

7664
// Const cast shorthands for ObjC types.
@@ -1012,33 +1000,29 @@ const TypeContextDescriptor *swift_getTypeContextDescriptor(const Metadata *type
10121000
SWIFT_RUNTIME_EXPORT
10131001
const HeapObject *swift_getKeyPath(const void *pattern, const void *arguments);
10141002

1015-
// For some reason, MSVC doesn't accept these declarations outside of
1016-
// swiftCore. TODO: figure out a reasonable way to declare them.
1017-
#if defined(swiftCore_EXPORTS)
1018-
10191003
/// Given a pointer to a borrowed value of type `Root` and a
10201004
/// `KeyPath<Root, Value>`, project a pointer to a borrowed value of type
10211005
/// `Value`.
1022-
SWIFT_RUNTIME_EXPORT
1023-
YieldOnceCoroutine<const OpaqueValue* (const OpaqueValue *root,
1024-
void *keyPath)>::type
1025-
swift_readAtKeyPath;
1006+
SWIFT_CC(swift) SWIFT_RUNTIME_EXPORT
1007+
YieldOnceResult<const OpaqueValue *>
1008+
swift_readAtKeyPath(YieldOnceBuffer *buffer, const OpaqueValue *root,
1009+
void *keypath);
10261010

10271011
/// Given a pointer to a mutable value of type `Root` and a
10281012
/// `WritableKeyPath<Root, Value>`, project a pointer to a mutable value
10291013
/// of type `Value`.
1030-
SWIFT_RUNTIME_EXPORT
1031-
YieldOnceCoroutine<OpaqueValue* (OpaqueValue *root, void *keyPath)>::type
1032-
swift_modifyAtWritableKeyPath;
1014+
SWIFT_CC(swift) SWIFT_RUNTIME_EXPORT
1015+
YieldOnceResult<OpaqueValue *>
1016+
swift_modifyAtWritableKeyPath(YieldOnceBuffer *buffer, OpaqueValue *root,
1017+
void *keyPath);
10331018

10341019
/// Given a pointer to a borrowed value of type `Root` and a
10351020
/// `ReferenceWritableKeyPath<Root, Value>`, project a pointer to a
10361021
/// mutable value of type `Value`.
1037-
SWIFT_RUNTIME_EXPORT
1038-
YieldOnceCoroutine<OpaqueValue* (const OpaqueValue *root, void *keyPath)>::type
1039-
swift_modifyAtReferenceWritableKeyPath;
1040-
1041-
#endif // swiftCore_EXPORTS
1022+
SWIFT_CC(swift) SWIFT_RUNTIME_EXPORT
1023+
YieldOnceResult<OpaqueValue *>
1024+
swift_modifyAtReferenceWritableKeyPath(YieldOnceBuffer *buffer,
1025+
const OpaqueValue *root, void *keyPath);
10421026

10431027
SWIFT_RUNTIME_EXPORT
10441028
void swift_enableDynamicReplacementScope(const DynamicReplacementScope *scope);

0 commit comments

Comments
 (0)