Home | History | Annotate | Download | only in CodeGenObjC
      1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -emit-llvm -o - %s | FileCheck %s
      2 struct Coerce {
      3   id a;
      4 };
      5 
      6 struct Coerce coerce_func(void);
      7 
      8 // CHECK-LABEL: define void @Coerce_test()
      9 void Coerce_test(void) {
     10   struct Coerce c;
     11   
     12   // CHECK: call i8* @coerce_func
     13   // CHECK: call i8* @objc_memmove_collectable(
     14   c = coerce_func();
     15 }
     16 
     17 struct Indirect {
     18   id a;
     19   int b[10];
     20 };
     21 
     22 struct Indirect indirect_func(void);
     23 
     24 // CHECK-LABEL: define void @Indirect_test()
     25 void Indirect_test(void) {
     26   struct Indirect i;
     27   
     28   // CHECK: call void @indirect_func(%struct.Indirect* sret
     29   // CHECK: call i8* @objc_memmove_collectable(
     30   i = indirect_func();
     31 }
     32