Home | History | Annotate | Download | only in ObjCARC
      1 ; RUN: opt -disable-output -objc-arc-contract < %s
      2 ; test that we don't crash on unreachable code
      3 %2 = type opaque
      4 
      5 define void @_i_Test__foo(%2 *%x) {
      6 entry:
      7   unreachable
      8 
      9 return:                                           ; No predecessors!
     10   %bar = bitcast %2* %x to i8*
     11   %foo = call i8* @objc_autoreleaseReturnValue(i8* %bar) nounwind
     12   call void @callee()
     13   call void @use_pointer(i8* %foo)
     14   call void @objc_release(i8* %foo) nounwind
     15   ret void
     16 }
     17 
     18 declare i8* @objc_autoreleaseReturnValue(i8*)
     19 declare void @objc_release(i8*)
     20 declare void @callee()
     21 declare void @use_pointer(i8*)
     22