From 05f9b14fc2d9950a1dd9a83d607ca2061711498b Mon Sep 17 00:00:00 2001 From: Marc Tiehuis Date: Fri, 24 Aug 2018 17:57:17 +1200 Subject: [PATCH] Fix builtin alignment type Closes #1235. --- doc/langref.html.in | 2 +- src/ir.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/langref.html.in b/doc/langref.html.in index 8bce703112..6f9a2bf3ea 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -6166,7 +6166,7 @@ pub const TypeInfo = union(TypeId) { size: Size, is_const: bool, is_volatile: bool, - alignment: u32, + alignment: u29, child: type, pub const Size = enum { diff --git a/src/ir.cpp b/src/ir.cpp index 32650204a6..406af8ee42 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -17125,7 +17125,7 @@ static ConstExprValue *ir_make_type_info_value(IrAnalyze *ira, TypeTableEntry *t // alignment: u32 ensure_field_index(result->type, "alignment", 3); fields[3].special = ConstValSpecialStatic; - fields[3].type = ira->codegen->builtin_types.entry_u32; + fields[3].type = get_int_type(ira->codegen, false, 29); bigint_init_unsigned(&fields[3].data.x_bigint, attrs_type->data.pointer.alignment); // child: type ensure_field_index(result->type, "child", 4);