From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/CodeGenObjC/constant-strings.m | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 clang/test/CodeGenObjC/constant-strings.m (limited to 'clang/test/CodeGenObjC/constant-strings.m') diff --git a/clang/test/CodeGenObjC/constant-strings.m b/clang/test/CodeGenObjC/constant-strings.m new file mode 100644 index 0000000..c308d7a --- /dev/null +++ b/clang/test/CodeGenObjC/constant-strings.m @@ -0,0 +1,16 @@ +// 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 + +// 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 +id a = @"Hello World!"; + -- cgit v1.2.3