diff options
| author | Ginger Bill <github@gingerbill.org> | 2016-09-22 13:34:14 +0100 |
|---|---|---|
| committer | Ginger Bill <github@gingerbill.org> | 2016-09-22 13:34:14 +0100 |
| commit | 6907951f1eebcc9053ccfbe32a30dc704e790747 (patch) | |
| tree | fb202a7f52e7d3f7d70362aa0a2436ba82080194 /src/checker/type.cpp | |
| parent | 664c2cd7a587feb18f02378506bdade2503343d3 (diff) | |
Fix type info generation
The problem: entry's index != entry->value in info_type_map
But I was assuming this
Diffstat (limited to 'src/checker/type.cpp')
| -rw-r--r-- | src/checker/type.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/checker/type.cpp b/src/checker/type.cpp index ae415b3d5..085e7c61e 100644 --- a/src/checker/type.cpp +++ b/src/checker/type.cpp @@ -1062,7 +1062,8 @@ i64 type_size_of(BaseTypeSizes s, gbAllocator allocator, Type *t) { if (max < size) max = size; } - return align_formula(max, s.max_align) + type_size_of(s, allocator, t_int); + // NOTE(bill): Align to int + return align_formula(max, s.word_size) + type_size_of(s, allocator, t_int); } break; case TypeRecord_RawUnion: { |