diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-12-11 16:30:01 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-12-11 16:30:01 -0500 |
| commit | 9b17c0ff7fa7a3981697f4239afb5c66c609cd42 (patch) | |
| tree | 96c2ae36609632900b8342387b181cecec31a6e1 /src/analyze.cpp | |
| parent | 3429639e848a9ffa9ff9fbd940d3fc2d348e10e7 (diff) | |
| download | zig-9b17c0ff7fa7a3981697f4239afb5c66c609cd42.tar.gz zig-9b17c0ff7fa7a3981697f4239afb5c66c609cd42.zip | |
IR: implement intType builtin
and int type field access
and fix compile time bool not
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index 3782d0a3e2..57f06da842 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -2809,3 +2809,14 @@ ConstExprValue *create_const_enum_tag(uint64_t tag) { init_const_enum_tag(const_val, tag); return const_val; } + +void init_const_bool(ConstExprValue *const_val, bool value) { + const_val->special = ConstValSpecialStatic; + const_val->data.x_bool = value; +} + +ConstExprValue *create_const_bool(bool value) { + ConstExprValue *const_val = allocate<ConstExprValue>(1); + init_const_bool(const_val, value); + return const_val; +} |
