24 lines · cpp
1// REQUIRES: x86-registered-target2// RUN: %clang_cc1 -triple x86_64-apple-darwin -S %s -o %t-64.s3// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s4// RUN: %clang_cc1 -triple i386-apple-darwin -S %s -o %t-32.s5// RUN: FileCheck -check-prefix CHECK-LP32 --input-file=%t-32.s %s6 7 8extern "C" int printf(...);9 10struct obj{ int a; float b; double d; };11 12void foo(obj o) {13 printf("%d %f %f\n", o.a, o.b, o.d);14}15 16int main() {17 obj o = obj();18 foo(obj());19}20 21// CHECK-LP64: callq __Z3foo3obj22 23// CHECK-LP32: calll __Z3foo3obj24