Skip to content

Commit 322ffc3

Browse files
authored
Merge pull request #41672 from mikeash/fix-swift-inspect-watchos
[swift-inspect] Fix some missing type conversions when targeting watchOS.
2 parents 8df83fe + 4b85670 commit 322ffc3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tools/swift-inspect/Sources/swift-inspect/Backtrace.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ internal enum BacktraceStyle {
2020
internal func backtrace(_ stack: [swift_reflection_ptr_t], style: BacktraceStyle,
2121
_ symbolicate: (swift_addr_t) -> (module: String?, symbol: String?)) -> String {
2222
func entry(_ address: swift_reflection_ptr_t) -> String {
23-
let (module, symbol) = symbolicate(address)
23+
let (module, symbol) = symbolicate(swift_addr_t(address))
2424
return "\(hex: address) (\(module ?? "<uknown>")) \(symbol ?? "<unknown>")"
2525
}
2626

tools/swift-inspect/Sources/swift-inspect/RemoteMirror+Extensions.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ extension SwiftReflectionContextRef {
6565
}
6666

6767
internal func name(type: swift_reflection_ptr_t) -> String? {
68-
let typeref: UInt64 = swift_reflection_typeRefForMetadata(self, UInt(type))
68+
let typeref = swift_reflection_typeRefForMetadata(self, UInt(type))
6969
if typeref == 0 { return nil }
7070

7171
guard let name = swift_reflection_copyDemangledNameForTypeRef(self, typeref) else {
@@ -97,7 +97,7 @@ extension SwiftReflectionContextRef {
9797
internal func isArrayOfClass(_ array: swift_reflection_ptr_t) -> Bool {
9898
guard isContiguousArray(array) else { return false }
9999

100-
let typeref: UInt64 = swift_reflection_typeRefForMetadata(self, UInt(array))
100+
let typeref = swift_reflection_typeRefForMetadata(self, UInt(array))
101101
if typeref == 0 { return false }
102102

103103
let count = swift_reflection_genericArgumentCountOfTypeRef(typeref)

0 commit comments

Comments
 (0)