File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ public class BinaryFile {
7272 case LLVMBinaryTypeMachO64L: self = . machO64L
7373 case LLVMBinaryTypeMachO64B: self = . machO64B
7474 case LLVMBinaryTypeWasm: self = . wasm
75- default : fatalError ( " unknown comdat selection kind \( llvm) " )
75+ default : fatalError ( " unknown binary type \( llvm) " )
7676 }
7777 }
7878 }
@@ -186,7 +186,7 @@ public struct Section {
186186 /// The size of the contents of the section.
187187 public let size : Int
188188 /// The raw contents of the section.
189- public let contents : String
189+ public let contents : UnsafeBufferPointer < CChar >
190190 /// The address of the section in the object file.
191191 public let address : Int
192192
@@ -197,7 +197,7 @@ public struct Section {
197197 self . sectionIterator = si
198198 self . name = String ( cString: LLVMGetSectionName ( si) )
199199 self . size = Int ( LLVMGetSectionSize ( si) )
200- self . contents = String ( cString : LLVMGetSectionContents ( si) )
200+ self . contents = UnsafeBufferPointer < CChar > ( start : LLVMGetSectionContents ( si) , count : self . size )
201201 self . address = Int ( LLVMGetSectionAddress ( si) )
202202 }
203203
You can’t perform that action at this time.
0 commit comments