Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin -S %s -o %t-64.s |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 2 | // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 3 | // RUN: %clang_cc1 -triple i386-apple-darwin -S %s -o %t-32.s |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 4 | // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s |
Fariborz Jahanian | 48620ba | 2009-10-20 23:29:04 +0000 | [diff] [blame] | 5 | |
| 6 | |
| 7 | extern "C" int printf(...); |
| 8 | |
| 9 | struct obj{ int a; float b; double d; }; |
| 10 | |
| 11 | void foo(obj o) { |
| 12 | printf("%d %f %f\n", o.a, o.b, o.d); |
| 13 | } |
| 14 | |
| 15 | int main() { |
| 16 | obj o = obj(); |
| 17 | foo(obj()); |
| 18 | } |
| 19 | |
Sean Callanan | 3b29901 | 2009-12-18 00:04:09 +0000 | [diff] [blame] | 20 | // CHECK-LP64: callq __Z3foo3obj |
Fariborz Jahanian | 48620ba | 2009-10-20 23:29:04 +0000 | [diff] [blame] | 21 | |
| 22 | // CHECK-LP32: call __Z3foo3obj |