File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
stdlib/public/RuntimeModule Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -502,7 +502,7 @@ protocol DwarfSource {
502502
503503}
504504
505- struct DwarfReader < S: DwarfSource > {
505+ struct DwarfReader < S: DwarfSource & AnyObject > {
506506
507507 typealias Source = S
508508 typealias Address = UInt64
@@ -513,7 +513,7 @@ struct DwarfReader<S: DwarfSource> {
513513 var end : Address { return base + size }
514514 }
515515
516- var source : Source
516+ unowned var source : Source
517517
518518 struct AbbrevInfo {
519519 var tag : Dwarf_Tag
Original file line number Diff line number Diff line change @@ -1793,8 +1793,9 @@ final class ElfImage<SomeElfTraits: ElfTraits>
17931793 }
17941794 }
17951795
1796- private lazy var dwarfReader
1797- = try ? DwarfReader ( source: self , shouldSwap: header. shouldByteSwap)
1796+ private lazy var dwarfReader = { [ unowned self] in
1797+ try ? DwarfReader ( source: self , shouldSwap: header. shouldByteSwap)
1798+ } ( )
17981799
17991800 typealias CallSiteInfo = DwarfReader < ElfImage > . CallSiteInfo
18001801
You can’t perform that action at this time.
0 commit comments