Merge pull request #1407 from ziglang/builtin-alignment-fix

Fix builtin alignment type
This commit is contained in:
Andrew Kelley 2018-08-24 10:42:43 -04:00 committed by GitHub
commit 0a918aaa14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -6166,7 +6166,7 @@ pub const TypeInfo = union(TypeId) {
size: Size, size: Size,
is_const: bool, is_const: bool,
is_volatile: bool, is_volatile: bool,
alignment: u32, alignment: u29,
child: type, child: type,
pub const Size = enum { pub const Size = enum {

View File

@ -17125,7 +17125,7 @@ static ConstExprValue *ir_make_type_info_value(IrAnalyze *ira, TypeTableEntry *t
// alignment: u32 // alignment: u32
ensure_field_index(result->type, "alignment", 3); ensure_field_index(result->type, "alignment", 3);
fields[3].special = ConstValSpecialStatic; 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); bigint_init_unsigned(&fields[3].data.x_bigint, attrs_type->data.pointer.alignment);
// child: type // child: type
ensure_field_index(result->type, "child", 4); ensure_field_index(result->type, "child", 4);