
escape.ll needed a simple manual check line update. contract-storestrong.ll:test12 is kind of contrived now. The comment says it's for testing bitcasts of pointers, which don't really matter anymore. Leaves identity ptr to ptr bitcasts (which I thought were illegal).
15 lines
375 B
LLVM
15 lines
375 B
LLVM
; RUN: opt -passes=objc-arc-contract -S < %s | FileCheck %s
|
|
|
|
declare ptr @llvm.objc.initWeak(ptr, ptr)
|
|
|
|
; Convert objc_initWeak(p, null) to *p = null.
|
|
|
|
; CHECK: define ptr @test0(ptr %p) {
|
|
; CHECK-NEXT: store ptr null, ptr %p
|
|
; CHECK-NEXT: ret ptr null
|
|
; CHECK-NEXT: }
|
|
define ptr @test0(ptr %p) {
|
|
%t = call ptr @llvm.objc.initWeak(ptr %p, ptr null)
|
|
ret ptr %t
|
|
}
|