Home | History | Annotate | Download | only in ObjCARC
      1 ; RUN: opt -objc-arc-expand -S < %s | FileCheck %s
      2 
      3 target datalayout = "e-p:64:64:64"
      4 
      5 declare i8* @objc_retain(i8*)
      6 declare i8* @objc_autorelease(i8*)
      7 
      8 declare void @use_pointer(i8*)
      9 
     10 ; CHECK: define void @test0
     11 ; CHECK: call void @use_pointer(i8* %x)
     12 ; CHECK: }
     13 define void @test0(i8* %x) nounwind {
     14 entry:
     15   %0 = call i8* @objc_retain(i8* %x) nounwind
     16   call void @use_pointer(i8* %0)
     17   ret void
     18 }
     19 
     20 ; CHECK: define void @test1
     21 ; CHECK: call void @use_pointer(i8* %x)
     22 ; CHECK: }
     23 define void @test1(i8* %x) nounwind {
     24 entry:
     25   %0 = call i8* @objc_autorelease(i8* %x) nounwind
     26   call void @use_pointer(i8* %x)
     27   ret void
     28 }
     29