diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-02-18 18:33:21 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-02-18 18:33:21 -0500 |
| commit | c4ee37f5067e7dd2c017df1fd6c57c1fad92cf85 (patch) | |
| tree | 296bbdc9529662abe24ae39ac1800399a64b488b /src/analyze.cpp | |
| parent | 0148f39df929cc00c1b2231acce41c22f74f9969 (diff) | |
| download | zig-c4ee37f5067e7dd2c017df1fd6c57c1fad92cf85.tar.gz zig-c4ee37f5067e7dd2c017df1fd6c57c1fad92cf85.zip | |
fix assertion failure when first use of a struct is sizeOf
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index e4ccf699ba..30f4d44cac 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -253,6 +253,7 @@ bool type_has_zero_bits_known(TypeTableEntry *type_entry) { uint64_t type_size(CodeGen *g, TypeTableEntry *type_entry) { + assert(type_is_complete(type_entry)); if (type_has_bits(type_entry)) { return LLVMStoreSizeOfType(g->target_data_ref, type_entry->type_ref); } else { |
