xref: /llvm-project/clang/test/CodeGenObjC/direct-method-ret-mismatch.m (revision 9466b49171dc4b21f56a48594fc82b1e52f5358a)
1// RUN: %clang_cc1 -emit-llvm -fobjc-arc -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
2
3__attribute__((objc_root_class))
4@interface Root
5- (Root *)method __attribute__((objc_direct));
6@end
7
8@implementation Root
9// CHECK-LABEL: define internal ptr @"\01-[Root something]"(
10- (id)something {
11  // CHECK: %{{[^ ]*}} = call {{.*}} @"\01-[Root method]"
12  return [self method];
13}
14
15// CHECK-LABEL: define hidden ptr @"\01-[Root method]"(
16- (id)method {
17  return self;
18}
19@end
20