[Backtracing] Implement Codable for Backtrace.

Add support for Codable to Bactkrace.

rdar://124913332
This commit is contained in:
Alastair Houghton
2025-01-01 16:40:38 +00:00
parent ffda416d36
commit 4826d60bc2
11 changed files with 496 additions and 10 deletions

View File

@@ -250,7 +250,7 @@ public enum CompactImageMapFormat {
}
}
public mutating func decode() -> ImageMap? {
mutating func decode() -> ([ImageMap.Image], ImageMap.WordSize)? {
// Check the version and decode the size
guard let infoByte = iterator.next() else {
return nil
@@ -375,7 +375,7 @@ public enum CompactImageMapFormat {
wsMap = .sixtyFourBit
}
return ImageMap(images: images, wordSize: wsMap)
return (images, wsMap)
}
}