Daniel Dunbar | ce9f423 | 2009-11-22 23:01:23 +0000 | [diff] [blame^] | 1 | // RUN: clang-cc -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s |
Anders Carlsson | 0a8f847 | 2009-09-16 15:53:40 +0000 | [diff] [blame] | 2 | |
Daniel Dunbar | ce9f423 | 2009-11-22 23:01:23 +0000 | [diff] [blame^] | 3 | // CHECK: [[i64_i64_ty:%.*]] = type { i64, i64 } |
| 4 | // CHECK: [[i64_double_ty:%.*]] = type { i64, double } |
Anders Carlsson | 0a8f847 | 2009-09-16 15:53:40 +0000 | [diff] [blame] | 5 | |
Daniel Dunbar | ce9f423 | 2009-11-22 23:01:23 +0000 | [diff] [blame^] | 6 | // Basic base class test. |
| 7 | struct f0_s0 { unsigned a; }; |
| 8 | struct f0_s1 : public f0_s0 { void *b; }; |
| 9 | // CHECK: define void @_Z2f05f0_s1([[i64_i64_ty]]) |
| 10 | void f0(f0_s1 a0) { } |
| 11 | |
| 12 | // Check with two eight-bytes in base class. |
| 13 | struct f1_s0 { unsigned a; unsigned b; float c; }; |
| 14 | struct f1_s1 : public f1_s0 { float d;}; |
| 15 | // CHECK: define void @_Z2f15f1_s1([[i64_double_ty]]) |
| 16 | void f1(f1_s1 a0) { } |
| 17 | |
| 18 | // Check with two eight-bytes in base class and merge. |
| 19 | struct f2_s0 { unsigned a; unsigned b; float c; }; |
| 20 | struct f2_s1 : public f2_s0 { char d;}; |
| 21 | // CHECK: define void @_Z2f25f2_s1([[i64_i64_ty]]) |
| 22 | void f2(f2_s1 a0) { } |
| 23 | |
Anders Carlsson | 0a8f847 | 2009-09-16 15:53:40 +0000 | [diff] [blame] | 24 | |