Skip to content

Commit 0a918aa

Browse files
authored
Merge pull request #1407 from ziglang/builtin-alignment-fix
Fix builtin alignment type
2 parents 3a02ba9 + 05f9b14 commit 0a918aa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

doc/langref.html.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6166,7 +6166,7 @@ pub const TypeInfo = union(TypeId) {
61666166
size: Size,
61676167
is_const: bool,
61686168
is_volatile: bool,
6169-
alignment: u32,
6169+
alignment: u29,
61706170
child: type,
61716171

61726172
pub const Size = enum {

src/ir.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17125,7 +17125,7 @@ static ConstExprValue *ir_make_type_info_value(IrAnalyze *ira, TypeTableEntry *t
1712517125
// alignment: u32
1712617126
ensure_field_index(result->type, "alignment", 3);
1712717127
fields[3].special = ConstValSpecialStatic;
17128-
fields[3].type = ira->codegen->builtin_types.entry_u32;
17128+
fields[3].type = get_int_type(ira->codegen, false, 29);
1712917129
bigint_init_unsigned(&fields[3].data.x_bigint, attrs_type->data.pointer.alignment);
1713017130
// child: type
1713117131
ensure_field_index(result->type, "child", 4);

0 commit comments

Comments
 (0)