diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-02-27 18:58:28 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-27 18:58:28 -0500 |
| commit | 720a5f87d402740045cc28650726c42adb521166 (patch) | |
| tree | e28008bbb3ff86babf48fbe4b80d078e9217c2f3 /src/Module.zig | |
| parent | 139b731d82d0b851c8fb2e6dbb48b735e63eecd1 (diff) | |
| parent | 9d4cfd9048d71d7519d759b9849914ce154d1877 (diff) | |
| download | zig-720a5f87d402740045cc28650726c42adb521166.tar.gz zig-720a5f87d402740045cc28650726c42adb521166.zip | |
Merge pull request #11006 from topolarity/resolve-union-alignment
stage2: Resolve alignment for union field in `@TypeInfo`
Diffstat (limited to 'src/Module.zig')
| -rw-r--r-- | src/Module.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Module.zig b/src/Module.zig index 9bc61aa708..8fed3138e7 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -1125,6 +1125,8 @@ pub const Union = struct { abi_align: Value, /// Returns the field alignment, assuming the union is not packed. + /// Keep implementation in sync with `Sema.unionFieldAlignment`. + /// Prefer to call that function instead of this one during Sema. pub fn normalAlignment(field: Field, target: Target) u32 { if (field.abi_align.tag() == .abi_align_default) { return field.ty.abiAlignment(target); |
