1*67e74705SXin Li// RUN: %clang_cc1 -triple x86_64-apple-darwin -fobjc-runtime=macosx-10.9.0 -emit-llvm %s -o - | FileCheck %s 2*67e74705SXin Li 3*67e74705SXin Li// RUN: %clang_cc1 -triple i386-apple-darwin -fobjc-runtime=macosx-fragile-10.9.0 -emit-llvm %s -o - | FileCheck %s 4*67e74705SXin Li 5*67e74705SXin Li@interface Root 6*67e74705SXin Li+(Class)class; 7*67e74705SXin Li@end 8*67e74705SXin Li 9*67e74705SXin Li__attribute__((objc_runtime_visible)) 10*67e74705SXin Li__attribute__((objc_runtime_name("MyRuntimeVisibleClass"))) 11*67e74705SXin Li@interface A : Root 12*67e74705SXin Li@end 13*67e74705SXin Li 14*67e74705SXin Li// CHECK: [[CLASSNAME:@.*]] = private unnamed_addr constant [22 x i8] c"MyRuntimeVisibleClass 15*67e74705SXin Li// CHECK: define i8* @getClass() #0 { 16*67e74705SXin LiClass getClass(void) { 17*67e74705SXin Li // CHECK: call i8* @objc_lookUpClass(i8* getelementptr inbounds ([22 x i8], [22 x i8]* [[CLASSNAME]], i32 0, i32 0)) #2 18*67e74705SXin Li return [A class]; 19*67e74705SXin Li} 20