xref: /llvm-project/clang/test/AST/ByteCode/codegen.m (revision e4d34261f85050af340ade9a7dcd332f11b4485f)
1// REQUIRES: x86-registered-target
2
3/// See test/CodeGenObjC/constant-strings.m
4/// Test that we let the APValue we create for ObjCStringLiterals point to the right expression.
5
6// RUN: %clang_cc1 -triple x86_64-macho -emit-llvm -o %t %s -fexperimental-new-constant-interpreter
7// RUN: FileCheck --check-prefix=CHECK-NEXT < %t %s
8
9// Check that we set alignment 1 on the string.
10//
11// CHECK-NEXT: @.str = {{.*}}constant [13 x i8] c"Hello World!\00", section "__TEXT,__cstring,cstring_literals", align 1
12id a = @"Hello World!";
13
14extern void OBJC_CLASS_$_f;
15Class c = (Class)&OBJC_CLASS_$_f;
16// CHECK: @c ={{.*}} global ptr @"OBJC_CLASS_$_f"
17// CHECK: @"OBJC_CLASS_$_f" ={{.*}} global %struct._class_t
18