IRGen: Implement an @_alignment attribute.

This is an internal-only affordance for the numerics team to be able to work on SIMD-compatible types. For now, it can only increase alignment of fixed-layout structs and enums; dynamic layout, classes, and other obvious extensions are left to another day when we can design a proper layout control design.

Swift SVN r27323
This commit is contained in:
Joe Groff
2015-04-15 17:23:30 +00:00
parent 92ec232e0c
commit e4e0f35aed
24 changed files with 402 additions and 26 deletions

View File

@@ -1178,6 +1178,12 @@ namespace decls_block {
BCFixed<1>, // implicit flag
BCBlob // asmname
>;
using AlignmentDeclAttrLayout = BCRecordLayout<
Alignment_DECL_ATTR,
BCFixed<1>, // implicit flag
BCFixed<31> // alignment
>;
using SemanticsDeclAttrLayout = BCRecordLayout<
Semantics_DECL_ATTR,