1 // RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -fno-constant-cfstrings -emit-llvm -o %t %s
2 // RUN: FileCheck --check-prefix CHECK-FRAGILE < %t %s
4 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fno-constant-cfstrings -emit-llvm -o %t %s
5 // RUN: FileCheck --check-prefix CHECK-NONFRAGILE < %t %s
7 @interface NSString @end
9 @interface NSSimpleCString : NSString {
12 unsigned int numBytes;
16 @interface NSConstantString : NSSimpleCString
19 #if OBJC_API_VERSION >= 2
20 extern Class _NSConstantStringClassReference;
22 extern struct objc_class _NSConstantStringClassReference;
25 const NSConstantString *appKey = @"MyApp";
28 const NSConstantString *appKey = @"MyApp";
29 const NSConstantString *appKey1 = @"MyApp1";
32 // CHECK-FRAGILE: @_NSConstantStringClassReference = external global
33 // CHECK-NONFRAGILE: @"OBJC_CLASS_$_NSConstantString" = external global
35 // CHECK-FRAGILE: @.str = private unnamed_addr constant [6 x i8] c"MyApp\00"
36 // CHECK-FRAGILE: @.str.1 = private unnamed_addr constant [7 x i8] c"MyApp1\00"
38 // CHECK-NONFRAGILE: @.str = private unnamed_addr constant [6 x i8] c"MyApp\00"
39 // CHECK-NONFRAGILE: @.str.1 = private unnamed_addr constant [7 x i8] c"MyApp1\00"