blob: 50ac49d8d2e15337617aa3b23760ed220909f803 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin -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 -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 Jahanian8f489d62009-09-23 22:34:00 +00005
6struct A {};
7
8struct B
9{
10 operator A&();
11};
12
13
14struct D : public B {
15 operator A();
16};
17
18extern B f();
19extern D d();
20
21int main() {
22 const A& rca = f();
23 const A& rca2 = d();
24}
25
26// CHECK-LP64: call __ZN1BcvR1AEv
27// CHECK-LP64: call __ZN1BcvR1AEv
28
29// CHECK-LP32: call L__ZN1BcvR1AEv
30// CHECK-LP32: call L__ZN1BcvR1AEv