blob: 6dc6de60184859bc44f64aafb2db453d315542f8 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00002// RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s
Daniel Dunbara5728872009-12-15 20:14:24 +00003// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00004// RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s
Fariborz Jahanian249cead2009-10-01 20:39:51 +00005
6struct A {
7 A(int);
8};
9
10struct B {
11 B(A);
12};
13
14int main () {
15 (B)10;
16 B(10);
17 static_cast<B>(10);
18}
19
Sean Callanan3b299012009-12-18 00:04:09 +000020// CHECK-LP64: callq __ZN1AC1Ei
21// CHECK-LP64: callq __ZN1BC1E1A
22// CHECK-LP64: callq __ZN1AC1Ei
23// CHECK-LP64: callq __ZN1BC1E1A
24// CHECK-LP64: callq __ZN1AC1Ei
25// CHECK-LP64: callq __ZN1BC1E1A
Fariborz Jahanian249cead2009-10-01 20:39:51 +000026
27// CHECK-LP32: call L__ZN1AC1Ei
28// CHECK-LP32: call L__ZN1BC1E1A
29// CHECK-LP32: call L__ZN1AC1Ei
30// CHECK-LP32: call L__ZN1BC1E1A
31// CHECK-LP32: call L__ZN1AC1Ei
32// CHECK-LP32: call L__ZN1BC1E1A