aboutsummaryrefslogtreecommitdiff
path: root/src/all_types.hpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-04-23 13:22:36 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-04-23 14:34:40 -0400
commit6de33ded81981554ccffc3ecbfcd5b0f628cf502 (patch)
tree520cfac3890b90d5357866a6c4b6e7e9509ee735 /src/all_types.hpp
parent2ed47070efa5933365da724e79f6ed87d603ee27 (diff)
downloadzig-6de33ded81981554ccffc3ecbfcd5b0f628cf502.tar.gz
zig-6de33ded81981554ccffc3ecbfcd5b0f628cf502.zip
make undefined as a constant value lazy
closes #268
Diffstat (limited to 'src/all_types.hpp')
-rw-r--r--src/all_types.hpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/all_types.hpp b/src/all_types.hpp
index e0f3e3961b..8608c11b11 100644
--- a/src/all_types.hpp
+++ b/src/all_types.hpp
@@ -98,9 +98,17 @@ struct ConstStructValue {
ConstParent parent;
};
+enum ConstArraySpecial {
+ ConstArraySpecialNone,
+ ConstArraySpecialUndef,
+};
+
struct ConstArrayValue {
- ConstExprValue *elements;
- ConstParent parent;
+ ConstArraySpecial special;
+ struct {
+ ConstExprValue *elements;
+ ConstParent parent;
+ } s_none;
};
enum ConstPtrSpecial {