Merging r260703:
[oota-llvm.git] / test / Transforms / ObjCARC / apelim.ll
index 5fefe53551c115ff99445d026e3251a7953e8683..14412c6fc9c7932723e0c75f0089e837f46723f4 100644 (file)
@@ -1,6 +1,8 @@
 ; RUN: opt -S -objc-arc-apelim < %s | FileCheck %s
 ; rdar://10227311
 
+@llvm.global_ctors = appending global [2 x { i32, void ()* }] [{ i32, void ()* } { i32 65535, void ()* @_GLOBAL__I_x }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I_y }]
+
 @x = global i32 0
 
 declare i32 @bar() nounwind
@@ -24,7 +26,7 @@ entry:
   ret void
 }
 
-; CHECK: define internal void @_GLOBAL__I_x()
+; CHECK: define internal void @_GLOBAL__I_x() {
 ; CHECK-NOT: @objc
 ; CHECK: }
 define internal void @_GLOBAL__I_x() {
@@ -35,9 +37,9 @@ entry:
   ret void
 }
 
-; CHECK: define internal void @_GLOBAL__I_y()
-; CHECK: %0 = call i8* @objc_autoreleasePoolPush() nounwind
-; CHECK: call void @objc_autoreleasePoolPop(i8* %0) nounwind
+; CHECK: define internal void @_GLOBAL__I_y() {
+; CHECK: %0 = call i8* @objc_autoreleasePoolPush() [[NUW:#[0-9]+]]
+; CHECK: call void @objc_autoreleasePoolPop(i8* %0) [[NUW]]
 ; CHECK: }
 define internal void @_GLOBAL__I_y() {
 entry:
@@ -49,3 +51,5 @@ entry:
 
 declare i8* @objc_autoreleasePoolPush()
 declare void @objc_autoreleasePoolPop(i8*)
+
+; CHECK: attributes #0 = { nounwind }