32 lines · plain
1// REQUIRES: x86-registered-target2 3// RUN: %clang_cc1 -triple x86_64-macho -emit-llvm -o %t %s4// RUN: FileCheck --check-prefix=CHECK-NEXT < %t %s5 6// Check that we set alignment 1 on the string.7//8// CHECK-NEXT: @.str = {{.*}}constant [13 x i8] c"Hello World!\00", section "__TEXT,__cstring,cstring_literals", align 19 10// RUN: %clang_cc1 -triple x86_64-macho -fobjc-runtime=gcc -emit-llvm -o %t %s11// RUN: FileCheck --check-prefix=CHECK-GNU < %t %s12// CHECK-GNU: NXConstantString13 14// RUN: %clang_cc1 -triple x86_64-macho -fobjc-runtime=gcc -fconstant-string-class NSConstantString -emit-llvm -o %t %s15// RUN: FileCheck --check-prefix=CHECK-GNU-WITH-CLASS < %t %s16// CHECK-GNU-WITH-CLASS: NSConstantString17//18// RUN: %clang_cc1 -triple x86_64-unknown-freebsd -fobjc-runtime=gnustep-2.0 -emit-llvm -o %t %s19// RUN: FileCheck --check-prefix=CHECK-GNUSTEP2 < %t %s20 21// CHECK-GNUSTEP2: @._OBJC_CLASS_NSConstantString = external global ptr22// CHECK-GNUSTEP2: @0 = private unnamed_addr constant [13 x i8] c"Hello World!\00", align 123// CHECK-GNUSTEP2: @.objc_string = private global { ptr, i32, i32, i32, i32, ptr } { ptr @._OBJC_CLASS_NSConstantString, i32 0, i32 12, i32 12, i32 0, ptr @0 }, section "__objc_constant_string", align 824// CHECK-GNUSTEP2: @b ={{.*}} global ptr inttoptr (i64 -3340545023602065388 to ptr), align 825// CHECK-GNUSTEP2: @.objc_str_Hello_World = linkonce_odr hidden global { ptr, i32, i32, i32, i32, ptr } { ptr @._OBJC_CLASS_NSConstantString, i32 0, i32 11, i32 11, i32 0, ptr @1 }, section "__objc_constant_string", comdat, align 826// CHECK-GNUSTEP2: @c =27// CHECK-SAME-GNUSTEP2: @.objc_str_Hello_World28//29id a = @"Hello World!";30id b = @"hi";31id c = @"Hello World";32