Galina Kistanova | 0ccb31c | 2011-06-03 22:24:54 +0000 | [diff] [blame] | 1 | // REQUIRES: x86-registered-target,x86-64-registered-target |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -triple x86_64-apple-darwin -S %s -o %t-64.s |
Tim Northover | 931a4fe | 2013-08-12 12:51:05 +0000 | [diff] [blame] | 3 | // RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 4 | // RUN: %clang_cc1 -triple i386-apple-darwin -S %s -o %t-32.s |
Tim Northover | 931a4fe | 2013-08-12 12:51:05 +0000 | [diff] [blame] | 5 | // RUN: FileCheck -check-prefix CHECK-LP32 --input-file=%t-32.s %s |
Fariborz Jahanian | 48620ba | 2009-10-20 23:29:04 +0000 | [diff] [blame] | 6 | |
| 7 | |
| 8 | extern "C" int printf(...); |
| 9 | |
| 10 | struct obj{ int a; float b; double d; }; |
| 11 | |
| 12 | void foo(obj o) { |
| 13 | printf("%d %f %f\n", o.a, o.b, o.d); |
| 14 | } |
| 15 | |
| 16 | int main() { |
| 17 | obj o = obj(); |
| 18 | foo(obj()); |
| 19 | } |
| 20 | |
Sean Callanan | 3b29901 | 2009-12-18 00:04:09 +0000 | [diff] [blame] | 21 | // CHECK-LP64: callq __Z3foo3obj |
Fariborz Jahanian | 48620ba | 2009-10-20 23:29:04 +0000 | [diff] [blame] | 22 | |
Chris Lattner | 398e6b9 | 2010-09-22 06:09:31 +0000 | [diff] [blame] | 23 | // CHECK-LP32: calll __Z3foo3obj |