view clang/test/CodeGenObjC/disable-direct-method.m @ 266:00f31e85ec16 default tip

Added tag current for changeset 31d058e83c98
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Oct 2023 10:13:55 +0900
parents 1f2b6ac9f198
children
line wrap: on
line source

// 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
}