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

21 lines
582 B
LLVM

; RUN: opt -disable-output -passes=objc-arc-contract < %s
; test that we don't crash on unreachable code
%2 = type opaque
define void @_i_Test__foo(ptr %x) {
entry:
unreachable
return: ; No predecessors!
%foo = call ptr @llvm.objc.autoreleaseReturnValue(ptr %x) nounwind
call void @callee()
call void @use_pointer(ptr %foo)
call void @llvm.objc.release(ptr %foo) nounwind
ret void
}
declare ptr @llvm.objc.autoreleaseReturnValue(ptr)
declare void @llvm.objc.release(ptr)
declare void @callee()
declare void @use_pointer(ptr)