mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 07:26:06 +00:00

This patch honors the unaligned type qualifier (currently available through he keyword __unaligned and -fms-extensions) in CodeGen. In the current form the patch affects declarations and expressions. It does not affect fields of classes. Differential Revision: https://reviews.llvm.org/D30166 llvm-svn: 297276
18 lines
367 B
C
18 lines
367 B
C
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fms-extensions -emit-llvm < %s | FileCheck %s
|
|
// Test that __unaligned does not impact the layout of the fields.
|
|
|
|
struct A
|
|
{
|
|
char a;
|
|
__unaligned int b;
|
|
} a;
|
|
// CHECK: %struct.A = type { i8, i32 }
|
|
|
|
struct A2
|
|
{
|
|
int b;
|
|
char a;
|
|
__unaligned int c;
|
|
} a2;
|
|
// CHECK: %struct.A2 = type { i32, i8, i32 }
|