1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/test/Transforms/ObjCARC/expand.ll
2011-06-15 23:37:01 +00:00

29 lines
624 B
LLVM

; RUN: opt -objc-arc-expand -S < %s | FileCheck %s
target datalayout = "e-p:64:64:64"
declare i8* @objc_retain(i8*)
declare i8* @objc_autorelease(i8*)
declare void @use_pointer(i8*)
; CHECK: define void @test0
; CHECK: call void @use_pointer(i8* %x)
; CHECK: }
define void @test0(i8* %x) nounwind {
entry:
%0 = call i8* @objc_retain(i8* %x) nounwind
call void @use_pointer(i8* %0)
ret void
}
; CHECK: define void @test1
; CHECK: call void @use_pointer(i8* %x)
; CHECK: }
define void @test1(i8* %x) nounwind {
entry:
%0 = call i8* @objc_autorelease(i8* %x) nounwind
call void @use_pointer(i8* %x)
ret void
}