Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenObjC / ivar-layout-flexible-array.m
blob8727ff19a7d1e3f558b9dfb2a9fe5b3e6402e245
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin -Wno-objc-root-class -fobjc-arc -emit-llvm -o - %s | FileCheck %s
3 @interface FlexibleArrayMember {
4   char flexible_array[][4][2];
6 @end
7 @implementation FlexibleArrayMember
8 @end
9 // CHECK: @OBJC_METH_VAR_NAME_{{.*}} = private unnamed_addr constant {{.*}} c"flexible_array\00"
10 // CHECK-NEXT: @OBJC_METH_VAR_TYPE_{{.*}} = private unnamed_addr constant {{.*}} c"^[4[2c]]\00"
13 typedef char FlexibleArray[];
15 struct Packet {
16   int size;
17   FlexibleArray data;
20 @interface VariableSizeIvar {
21   struct Packet flexible_struct;
23 @end
24 @implementation VariableSizeIvar
25 @end
26 // CHECK: @OBJC_METH_VAR_NAME_{{.*}} = private unnamed_addr constant {{.*}} c"flexible_struct\00"
27 // CHECK-NEXT: @OBJC_METH_VAR_TYPE_{{.*}} = private unnamed_addr constant {{.*}} c"{Packet=\22size\22i\22data\22[0c]}\00"