Anders Carlsson | bfc008d | 2010-01-27 03:22:55 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s |
| 2 | |
| 3 | // Non-trivial dtors, should both be passed indirectly. |
| 4 | struct S { |
| 5 | ~S(); |
| 6 | int s; |
| 7 | }; |
| 8 | |
| 9 | // CHECK: define void @_Z1fv(%struct.S* noalias sret % |
| 10 | S f() { return S(); } |
| 11 | // CHECK: define void @_Z1f1S(%struct.S*) |
| 12 | void f(S) { } |
| 13 | |
| 14 | // Non-trivial dtors, should both be passed indirectly. |
| 15 | class C { |
| 16 | ~C(); |
| 17 | double c; |
| 18 | }; |
| 19 | |
| 20 | // CHECK: define void @_Z1gv(%class.C* noalias sret % |
| 21 | C g() { return C(); } |
| 22 | |
| 23 | // CHECK: define void @_Z1f1C(%class.C*) |
| 24 | void f(C) { } |