mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 12:26:52 +08:00
there is no reason to align them higher. - This roughly matches llvm-gcc's r126913. - It is an open question whether or not we should do this for cstring's in general (code size vs optimization potential), for now we just match llvm-gcc until someone wants to run some experiments. llvm-svn: 129410
19 lines
660 B
Objective-C
19 lines
660 B
Objective-C
// RUN: %clang_cc1 -emit-llvm -o %t %s
|
|
// RUN: FileCheck --check-prefix=CHECK-NEXT < %t %s
|
|
|
|
// Check that we set alignment 1 on the string.
|
|
//
|
|
// CHECK-NEXT: @.str = {{.*}}constant [13 x i8] c"Hello World!\00", align 1
|
|
|
|
// RUN: %clang_cc1 -fgnu-runtime -emit-llvm -o %t %s
|
|
// RUN: FileCheck --check-prefix=CHECK-GNU < %t %s
|
|
// CHECK-GNU: NXConstantString
|
|
// CHECK-GNU-NOT: NXConstantString
|
|
|
|
// RUN: %clang_cc1 -fgnu-runtime -fconstant-string-class NSConstantString -emit-llvm -o %t %s
|
|
// RUN: FileCheck --check-prefix=CHECK-GNU-WITH-CLASS < %t %s
|
|
// CHECK-GNU-WITH-CLASS: NSConstantString
|
|
// CHECK-GNU-WITH-CLASS-NOT: NSConstantString
|
|
id a = @"Hello World!";
|
|
|