Home | History | Annotate | Download | only in CodeGen
      1 // RUN: %clang_cc1 -Werror -triple i386-unknown-unknown -emit-llvm -o %t %s
      2 // RUN: FileCheck < %t %s
      3 //
      4 // FIXME: Note that we don't currently get the ABI right here. f0() should be
      5 // f0(i8*).
      6 
      7 typedef union {
      8   void *f0;
      9 } transp_t0 __attribute__((transparent_union));
     10 
     11 void f0(transp_t0 obj);
     12 
     13 // CHECK: define void @f1_0(i32* %a0)
     14 // CHECK:  call void @f0(%union.transp_t0* byval align 4 %{{.*}})
     15 // CHECK:  call void %{{.*}}(i8* %{{[a-z0-9]*}})
     16 // CHECK: }
     17 void f1_0(int *a0) {
     18   void (*f0p)(void *) = f0;
     19   f0(a0);
     20   f0p(a0);
     21 }
     22 
     23 void f1_1(int *a0) {
     24   f0((transp_t0) { a0 });
     25 }
     26