File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
validation-test/SILOptimizer Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ class DataWrapper {
2929 var pointer : UnsafeMutableRawBufferPointer
3030
3131 init ( count: Int ) {
32- pointer = UnsafeMutableRawBufferPointer . allocate ( byteCount: count, alignment: MemoryLayout< Int> . alignment)
32+ pointer = UnsafeMutableRawBufferPointer . allocate ( byteCount: count * MemoryLayout < Int > . stride , alignment: MemoryLayout< Int> . alignment)
3333 }
3434
3535 var bytes : UnsafeMutableRawBufferPointer { return pointer }
@@ -43,7 +43,7 @@ var fileHandleMap: [Int32 : String] = [:]
4343
4444func openTheFile( _ path: String ) -> Int32 {
4545 let fd : Int32 = 42
46- assert ( fileHandleMap [ fd] == nil )
46+ precondition ( fileHandleMap [ fd] == nil )
4747 fileHandleMap [ fd] = path
4848 return fd
4949}
@@ -53,7 +53,7 @@ func closeTheFile(_ fd: Int32) {
5353}
5454
5555func writeToTheFile( _ fd: Int32 ) {
56- assert ( fileHandleMap [ fd] != nil )
56+ precondition ( fileHandleMap [ fd] != nil )
5757}
5858
5959class FileHandleWrapper {
You can’t perform that action at this time.
0 commit comments