1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -x objective-c -fobjc-arc -emit-pch -o %t %s 2// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -x objective-c -fobjc-arc -include-pch %t -emit-llvm -o - %s | FileCheck %s 3 4#ifndef HEADER 5#define HEADER 6 7typedef struct { 8 id f; 9} S; 10 11static inline id getObj(id a) { 12 S *p = &(S){ .f = a }; 13 return p->f; 14} 15 16#else 17 18// CHECK: %[[STRUCT_S:.*]] = type { i8* } 19 20// CHECK: define internal i8* @getObj( 21// CHECK: %[[_COMPOUNDLITERAL:.*]] = alloca %[[STRUCT_S]], 22// CHECK: %[[V5:.*]] = bitcast %[[STRUCT_S]]* %[[_COMPOUNDLITERAL]] to i8** 23// CHECK: call void @__destructor_8_s0(i8** %[[V5]]) 24 25id test(id a) { 26 return getObj(a); 27} 28 29#endif 30