blob: 0e4c2abc1074a70fba1cd2307101743ba1a85937 [file] [log] [blame]
Daniel Dunbarce9f4232009-11-22 23:01:23 +00001// RUN: clang-cc -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s
Anders Carlsson0a8f8472009-09-16 15:53:40 +00002
Daniel Dunbarce9f4232009-11-22 23:01:23 +00003// CHECK: [[i64_i64_ty:%.*]] = type { i64, i64 }
4// CHECK: [[i64_double_ty:%.*]] = type { i64, double }
Anders Carlsson0a8f8472009-09-16 15:53:40 +00005
Daniel Dunbarce9f4232009-11-22 23:01:23 +00006// Basic base class test.
7struct f0_s0 { unsigned a; };
8struct f0_s1 : public f0_s0 { void *b; };
9// CHECK: define void @_Z2f05f0_s1([[i64_i64_ty]])
10void f0(f0_s1 a0) { }
11
12// Check with two eight-bytes in base class.
13struct f1_s0 { unsigned a; unsigned b; float c; };
14struct f1_s1 : public f1_s0 { float d;};
15// CHECK: define void @_Z2f15f1_s1([[i64_double_ty]])
16void f1(f1_s1 a0) { }
17
18// Check with two eight-bytes in base class and merge.
19struct f2_s0 { unsigned a; unsigned b; float c; };
20struct f2_s1 : public f2_s0 { char d;};
21// CHECK: define void @_Z2f25f2_s1([[i64_i64_ty]])
22void f2(f2_s1 a0) { }
23
Anders Carlsson0a8f8472009-09-16 15:53:40 +000024