Matt Arsenault 01e4f41b43 ObjCARC: Update tests to use opaque pointers
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).
2022-12-12 22:46:26 -05:00

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
}