From 9b17c0ff7fa7a3981697f4239afb5c66c609cd42 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 11 Dec 2016 16:30:01 -0500 Subject: IR: implement intType builtin and int type field access and fix compile time bool not --- src/analyze.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/analyze.cpp') 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(1); + init_const_bool(const_val, value); + return const_val; +} -- cgit v1.2.3