blob: 9b993f2506c69e7764dfe8b69b44e69ab23f9e68 [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 Jahanian7498e502009-09-25 18:11:25 +00006
Fariborz Jahanianb3c47742009-09-25 18:59:21 +00007struct A { A(const A&, int i1 = 1); };
Fariborz Jahanian7498e502009-09-25 18:11:25 +00008
9struct B : A { };
10
11A f(const B &b) {
12 return b;
13}
14
Sean Callanan3b299012009-12-18 00:04:09 +000015// CHECK-LP64: callq __ZN1AC1ERKS_i
Fariborz Jahanian7498e502009-09-25 18:11:25 +000016
Chris Lattner398e6b92010-09-22 06:09:31 +000017// CHECK-LP32: calll L__ZN1AC1ERKS_i
Fariborz Jahanian7498e502009-09-25 18:11:25 +000018
19