blob: b7a9740ddf1c9d07089714f507210aa2724e3613 [file] [log] [blame]
Galina Kistanova0ccb31c2011-06-03 22:24:54 +00001// REQUIRES: x86-registered-target,x86-64-registered-target
Daniel Dunbara5728872009-12-15 20:14:24 +00002// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00003// RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s
Daniel Dunbara5728872009-12-15 20:14:24 +00004// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00005// RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s
Fariborz Jahanian249cead2009-10-01 20:39:51 +00006
7struct A {
8 A(int);
9};
10
11struct B {
12 B(A);
13};
14
15int main () {
16 (B)10;
17 B(10);
18 static_cast<B>(10);
19}
20
Sean Callanan3b299012009-12-18 00:04:09 +000021// 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 Jahanian249cead2009-10-01 20:39:51 +000027
Chris Lattner398e6b92010-09-22 06:09:31 +000028// 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