mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-06 21:05:51 +00:00
9fbd318d36
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133108 91177308-0d34-0410-b5e6-96231b3b80d8
29 lines
624 B
LLVM
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
|
|
}
|