teak-llvm/clang/test/CodeGen/unaligned-decl.c
Roger Ferrer Ibanez 3fa38a14ac Honor __unaligned in codegen for declarations and expressions
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
2017-03-08 14:00:44 +00:00

23 lines
508 B
C

// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fms-extensions -emit-llvm < %s | FileCheck %s
// CHECK: @a1 = global i32 1, align 1
__unaligned int a1 = 1;
// CHECK: @a2 = global i32 1, align 1
int __unaligned a2 = 1;
// CHECK: @a3 = {{.*}} align 1
__unaligned int a3[10];
// CHECK: @a4 = {{.*}} align 1
int __unaligned a4[10];
// CHECK: @p1 = {{.*}} align 1
int *__unaligned p1;
// CHECK: @p2 = {{.*}} align 8
int __unaligned *p2;
// CHECK: @p3 = {{.*}} align 1
int __unaligned *__unaligned p3;