| 1 |
// RUN: %clang_cc1 -emit-llvm-only -triple i686-windows-gnu -fdump-record-layouts %s | FileCheck %s |
| 2 |
// RUN: %clang_cc1 -emit-llvm-only -triple i686-windows-cygnus -fdump-record-layouts %s | FileCheck %s |
| 3 |
// RUN: %clang_cc1 -emit-llvm-only -triple i686-linux -fdump-record-layouts -Wno-incompatible-ms-struct %s | FileCheck %s |
| 4 |
// RUN: not %clang_cc1 -emit-llvm-only -triple i686-linux -fdump-record-layouts %s 2>&1 | FileCheck %s -check-prefix=ERROR |
| 5 |
|
| 6 |
struct ldb_struct { |
| 7 |
char c; |
| 8 |
long double ldb; |
| 9 |
} __attribute__((__ms_struct__)); |
| 10 |
|
| 11 |
struct ldb_struct a; |
| 12 |
|
| 13 |
// CHECK: 0 | struct ldb_struct |
| 14 |
// CHECK-NEXT: 0 | char c |
| 15 |
// CHECK-NEXT: 4 | long double ldb |
| 16 |
// CHECK-NEXT: | [sizeof=16, align=4] |
| 17 |
|
| 18 |
// ERROR: error: ms_struct may not produce Microsoft-compatible layouts with fundamental data types with sizes that aren't a power of two |