Galina Kistanova | 0ccb31c | 2011-06-03 22:24:54 +0000 | [diff] [blame] | 1 | // REQUIRES: x86-registered-target,x86-64-registered-target |
Richard Smith | 762bb9d | 2011-10-13 22:29:44 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -S %s -o %t-64.s |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 3 | // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s |
Richard Smith | 762bb9d | 2011-10-13 22:29:44 +0000 | [diff] [blame] | 4 | // RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -S %s -o %t-32.s |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 5 | // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s |
Fariborz Jahanian | 249cead | 2009-10-01 20:39:51 +0000 | [diff] [blame] | 6 | |
| 7 | struct A { |
| 8 | A(int); |
| 9 | }; |
| 10 | |
| 11 | struct B { |
| 12 | B(A); |
| 13 | }; |
| 14 | |
| 15 | int main () { |
| 16 | (B)10; |
| 17 | B(10); |
| 18 | static_cast<B>(10); |
| 19 | } |
| 20 | |
Sean Callanan | 3b29901 | 2009-12-18 00:04:09 +0000 | [diff] [blame] | 21 | // CHECK-LP64: callq __ZN1AC1Ei |
| 22 | // CHECK-LP64: callq __ZN1BC1E1A |
| 23 | // CHECK-LP64: callq __ZN1AC1Ei |
| 24 | // CHECK-LP64: callq __ZN1BC1E1A |
| 25 | // CHECK-LP64: callq __ZN1AC1Ei |
| 26 | // CHECK-LP64: callq __ZN1BC1E1A |
Fariborz Jahanian | 249cead | 2009-10-01 20:39:51 +0000 | [diff] [blame] | 27 | |
Chris Lattner | 398e6b9 | 2010-09-22 06:09:31 +0000 | [diff] [blame] | 28 | // CHECK-LP32: calll L__ZN1AC1Ei |
| 29 | // CHECK-LP32: calll L__ZN1BC1E1A |
| 30 | // CHECK-LP32: calll L__ZN1AC1Ei |
| 31 | // CHECK-LP32: calll L__ZN1BC1E1A |
| 32 | // CHECK-LP32: calll L__ZN1AC1Ei |
| 33 | // CHECK-LP32: calll L__ZN1BC1E1A |