Files
swift-mirror/test/Serialization/alignment.swift
Joe Groff e4e0f35aed 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
2015-04-15 17:23:30 +00:00

11 lines
266 B
Swift

// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: %target-swift-frontend %s -emit-module -parse-as-library -o %t
// RUN: %target-sil-opt %t/alignment.swiftmodule -o - | FileCheck %s
//CHECK: @_alignment(16) struct Foo {
@_alignment(16) struct Foo {}
func foo(x: Foo) {}