Commit graph

7 commits

Author SHA1 Message Date
Cameron Hart
15d1c4d213 Implementation of #[repr(packed(n))] RFC 1399. 2018-04-11 22:13:13 +10:00
Cameron Hart
651ea8ea44 Stabilized #[repr(align(x))] attribute (RFC 1358) 2018-01-23 08:36:13 +11:00
Cameron Hart
ebc2f7d6ed Support repr alignment on unions. 2017-07-17 07:55:49 +10:00
Lee Bousfield
da81a33b05
Box large array to avoid blowing the stack 2017-07-08 13:02:52 -04:00
Lee Bousfield
a10213f297 Raised alignment limit from 2^15 to 2^31 2017-07-08 10:28:56 -04:00
Cameron Hart
7971a47eff Added feature gate, updated error messages and tests. 2017-04-21 07:37:10 +10:00
Cameron Hart
4358e35fda Implementation of repr struct alignment RFC 1358.
The main changes around rustc::ty::Layout::struct and rustc_trans:adt:
* Added primitive_align field which stores alignment before repr align
* Always emit field padding when generating the LLVM struct fields
* Added methods for adjusting field indexes from the layout index to the
  LLVM struct field index

The main user of this information is rustc_trans::adt::struct_llfields
which determines the LLVM fields to be used by LLVM, including padding
fields.
2017-04-21 07:32:32 +10:00