diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-11-24 16:15:58 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-11-24 16:15:58 -0500 |
| commit | 3d2752cc3677535ddfbeeefba4036633bcab01dc (patch) | |
| tree | 461cb6fc9eaf9ccbc8e6c8ea5207a380ecbcca2b /src/analyze.hpp | |
| parent | 56a8f2b018a6ee1f1116a64d34803511a6fbad80 (diff) | |
| download | zig-3d2752cc3677535ddfbeeefba4036633bcab01dc.tar.gz zig-3d2752cc3677535ddfbeeefba4036633bcab01dc.zip | |
refactor type_requires_comptime to have possible error
fixes a compiler crash when building
https://github.com/AndreaOrru/zen
Diffstat (limited to 'src/analyze.hpp')
| -rw-r--r-- | src/analyze.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/analyze.hpp b/src/analyze.hpp index e727b050ea..b506b533ca 100644 --- a/src/analyze.hpp +++ b/src/analyze.hpp @@ -87,7 +87,6 @@ ZigFn *create_fn(CodeGen *g, AstNode *proto_node); ZigFn *create_fn_raw(CodeGen *g, FnInline inline_value); void init_fn_type_id(FnTypeId *fn_type_id, AstNode *proto_node, size_t param_count_alloc); AstNode *get_param_decl_node(ZigFn *fn_entry, size_t index); -bool type_requires_comptime(ZigType *type_entry); Error ATTRIBUTE_MUST_USE ensure_complete_type(CodeGen *g, ZigType *type_entry); Error ATTRIBUTE_MUST_USE type_resolve(CodeGen *g, ZigType *type_entry, ResolveStatus status); void complete_enum(CodeGen *g, ZigType *enum_type); @@ -216,4 +215,11 @@ bool want_first_arg_sret(CodeGen *g, FnTypeId *fn_type_id); uint32_t get_host_int_bytes(CodeGen *g, ZigType *struct_type, TypeStructField *field); +enum ReqCompTime { + ReqCompTimeInvalid, + ReqCompTimeNo, + ReqCompTimeYes, +}; +ReqCompTime type_requires_comptime(CodeGen *g, ZigType *type_entry); + #endif |
