brintos

brintos / llvm-project-archived public Read only

0
0
Text · 618 B · 7e8f69f Raw
29 lines · plain
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -x objective-c -fobjc-arc -emit-pch -o %t %s2// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -x objective-c -fobjc-arc -include-pch %t -emit-llvm -o - %s | FileCheck %s3 4#ifndef HEADER5#define HEADER6 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#else17 18// CHECK: %[[STRUCT_S:.*]] = type { ptr }19 20// CHECK: define internal ptr @getObj(21// CHECK: %[[_COMPOUNDLITERAL:.*]] = alloca %[[STRUCT_S]],22// CHECK: call void @__destructor_8_s0(ptr %[[_COMPOUNDLITERAL]])23 24id test(id a) {25  return getObj(a);26}27 28#endif29