1 // RUN: %clang_cc1 -triple mips64-linux-gnu -o - -emit-llvm %s | FileCheck %s
3 // Transparent unions are passed according to the calling convention rules of
4 // the first member. In this case, it is as if it were a void pointer so we
5 // do not have the inreg attribute we would normally have for unions.
7 // This comes up in glibc's wait() function and matters for the big-endian N32
8 // case where pointers are promoted to i64 and a non-transparent union would be
9 // passed in the upper 32-bits of an i64.
11 union either_pointer
{
14 } __attribute__((transparent_union
));
16 extern void foo(union either_pointer p
);
24 // CHECK-LABEL: define{{.*}} void @bar()
25 // CHECK: call void @foo(ptr %{{[0-9]+}})
27 // CHECK: declare void @foo(ptr)