Files
swift-mirror/test/DebugInfo/alignment.swift
John McCall c1f99b5fdb Cap type alignment in Swift at 16.
rdar://31411216
2018-08-28 16:13:50 -04:00

18 lines
413 B
Swift

// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
@_alignment(8)
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "S8"
// CHECK-SAME: align: 64,
struct S8 { var x, y, z, w: Float }
@_alignment(16)
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "E16"
// CHECK-SAME: align: 128,
enum E16 {
case F(Float)
case I(Int64)
}
var s: S8
var e: E16