view clang/test/CodeGenObjC/direct-method-ret-mismatch.m @ 180:680fa57a2f20

fix compile errors.
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 30 May 2020 17:44:06 +0900
parents 1d019706d866
children c4bab56944e8
line wrap: on
line source

// RUN: %clang_cc1 -emit-llvm -fobjc-arc -triple x86_64-apple-darwin10 %s -o - | FileCheck %s

__attribute__((objc_root_class))
@interface Root
- (Root *)method __attribute__((objc_direct));
@end

@implementation Root
// CHECK-LABEL: define internal i8* @"\01-[Root something]"(
- (id)something {
  // CHECK: %{{[^ ]*}} = call {{.*}} @"\01-[Root method]"
  return [self method];
}

// CHECK-LABEL: define hidden i8* @"\01-[Root method]"(
- (id)method {
  return self;
}
@end