Skip to content

Commit 71abe8b

Browse files
committed
swift_allocError should use the Swift calling convention
1 parent e66f7fd commit 71abe8b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

stdlib/public/runtime/ErrorObject.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ static const FullMetadata<HeapMetadata> ErrorProtocolMetadata{
6262
Metadata{MetadataKind::ErrorObject},
6363
};
6464

65+
SWIFT_CC(swift) SWIFT_RUNTIME_EXPORT
66+
extern "C"
6567
BoxPair::Return
6668
swift::swift_allocError(const swift::Metadata *type,
6769
const swift::WitnessTable *errorConformance,

stdlib/public/runtime/ErrorObject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ struct SwiftError : SwiftErrorHeader {
142142
/// copied (or taken if \c isTake is true) into the newly-allocated error box.
143143
/// If value is null, the box's contents will be left uninitialized, and
144144
/// \c isTake should be false.
145-
SWIFT_RUNTIME_EXPORT
145+
SWIFT_CC(swift) SWIFT_RUNTIME_EXPORT
146146
extern "C" BoxPair::Return swift_allocError(const Metadata *type,
147147
const WitnessTable *errorConformance,
148148
OpaqueValue *value, bool isTake);

0 commit comments

Comments
 (0)