llvm/test/Bitcode/upgrade-objcretainrelease.ll
Akira Hatanaka 9eaa79da9e [ObjC][ARC] Convert the retainRV marker that is passed as a named
metadata into a module flag in the auto-upgrader and make the ARC
contract pass read the marker as a module flag.

This is needed to fix a bug where ARC contract wasn't inserting the
retainRV marker when LTO was enabled, which caused objects returned
from a function to be auto-released.

rdar://problem/49464214

Differential Revision: https://reviews.llvm.org/D60303

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358047 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-10 06:20:20 +00:00

7 lines
298 B
LLVM

; Test that comment token for objc retain release is upgraded from '#' to ';'
;
; RUN: llvm-dis < %s.bc | FileCheck %s
; CHECK: !llvm.module.flags = !{!0}
; CHECK: !0 = !{i32 1, !"clang.arc.retainAutoreleasedReturnValueMarker", !"mov\09fp, fp\09\09; marker for objc_retainAutoreleaseReturnValue"}