Skip to content

Commit

Permalink
Type: prevent using getAttribute with the aligned attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
ehaas committed Sep 5, 2024
1 parent 3624ec7 commit 00fbde7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/aro/Type.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2343,6 +2343,7 @@ pub fn base(ty: *Type) *Type {
}

pub fn getAttribute(ty: Type, comptime tag: Attribute.Tag) ?Attribute.ArgumentsForTag(tag) {
if (tag == .aligned) @compileError("use requestedAlignment");
var it = Attribute.Iterator.initType(ty);
while (it.next()) |item| {
const attribute, _ = item;
Expand Down

0 comments on commit 00fbde7

Please sign in to comment.