summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenObjC/disable-direct-method.m
blob: 3fca36f18271ff07eb77dd988c4fbb63ad19c375 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin10 -fobjc-disable-direct-methods-for-testing %s -o - | FileCheck %s

@interface Y
@property (direct) int direct_property;
@end
@implementation Y @end

// CHECK: @OBJC_PROP_NAME_ATTR_ = private unnamed_addr constant [16 x i8] c"direct_property\00"
// CHECK: @"_OBJC_$_PROP_LIST_Y" =
// CHECK-SAME: @OBJC_PROP_NAME_ATTR_,

@interface X
-(void)m __attribute__((objc_direct));
@end

// CHECK-LABEL: define void @f
void f(X *x) {
  [x m];

  // CHECK: call void @objc_msgSend
}