Skip to content

Commit 03ecfe2

Browse files
authored
Merge pull request swiftlang#12350 from compnerd/calling-conv
stdlib: fix build for non-ObjC targets
2 parents 756c196 + 5022dbc commit 03ecfe2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

stdlib/public/core/RuntimeFunctionCounters.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,13 @@ internal func _collectAllReferencesInsideObjectImpl(
9191
// of runtime function counters.
9292
public // @testable
9393
struct _RuntimeFunctionCounters {
94+
#if os(Windows) && arch(x86_64)
9495
public typealias RuntimeFunctionCountersUpdateHandler =
95-
@convention(c) (_ object: UnsafeRawPointer, _ functionId: Int64) -> Void
96+
@convention(c) (_ object: UnsafeRawPointer, _ functionId: Int) -> Void
97+
#else
98+
public typealias RuntimeFunctionCountersUpdateHandler =
99+
@convention(c) (_ object: UnsafeRawPointer, _ functionId: Int64) -> Void
100+
#endif
96101

97102
public static let runtimeFunctionNames =
98103
getRuntimeFunctionNames()

0 commit comments

Comments
 (0)