Begin work on const llvm aggregate literals

This commit is contained in:
Ginger Bill
2016-09-30 20:38:46 +01:00
parent 04b5d8c132
commit c6aac264fa
12 changed files with 320 additions and 109 deletions
+5 -3
View File
@@ -619,9 +619,11 @@ void add_type_and_value(CheckerInfo *i, AstNode *expression, AddressingMode mode
return;
if (mode == Addressing_Constant) {
GB_ASSERT(value.kind != ExactValue_Invalid);
if (!(type != t_invalid || is_type_constant_type(type))) {
compiler_error("add_type_and_value - invalid type: %s", type_to_string(type));
if (is_type_constant_type(type)) {
GB_ASSERT(value.kind != ExactValue_Invalid);
if (!(type != t_invalid || is_type_constant_type(type))) {
compiler_error("add_type_and_value - invalid type: %s", type_to_string(type));
}
}
}