2011-10-02 09:16:38 +08:00
|
|
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fobjc-arc -fobjc-exceptions -o - %s | FileCheck %s
|
2011-07-21 07:39:56 +08:00
|
|
|
// pr10411
|
2011-10-01 18:32:24 +08:00
|
|
|
// rdar://10042689
|
2011-07-21 07:39:56 +08:00
|
|
|
|
2011-10-01 18:32:24 +08:00
|
|
|
id make(void);
|
|
|
|
void test() {
|
|
|
|
@throw make();
|
2011-07-21 07:39:56 +08:00
|
|
|
}
|
|
|
|
|
2011-10-01 18:32:24 +08:00
|
|
|
// TODO: We should probably emit this specific pattern without the reclaim.
|
|
|
|
|
|
|
|
// CHECK: define void @test()
|
|
|
|
// CHECK: [[T0:%.*]] = call i8* @make()
|
|
|
|
// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
|
|
|
|
// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_autorelease(i8* [[T1]])
|
2013-02-22 17:10:20 +08:00
|
|
|
// CHECK-NEXT: call void @objc_exception_throw(i8* [[T2]]) [[NR:#[0-9]+]]
|
2011-10-01 18:32:24 +08:00
|
|
|
// CHECK-NEXT: unreachable
|
2013-02-22 17:10:20 +08:00
|
|
|
|
|
|
|
// CHECK: attributes [[NR]] = { noreturn }
|