| ... | ... | @@ -16882,16 +16882,12 @@ static void ensure_field_index(ZigType *type, const char *field_name, size_t ind |
| 16882 | 16882 | |
| 16883 | 16883 | static ZigType *ir_type_info_get_type(IrAnalyze *ira, const char *type_name, ZigType *root) { |
| 16884 | 16884 | Error err; |
| 16885 | | static ConstExprValue *type_info_var = nullptr; // TODO oops this global variable made it past code review |
| 16886 | | static ZigType *type_info_type = nullptr; // TODO oops this global variable made it past code review |
| 16887 | | if (type_info_var == nullptr) { |
| 16888 | | type_info_var = get_builtin_value(ira->codegen, "TypeInfo"); |
| 16889 | | assert(type_info_var->type->id == ZigTypeIdMetaType); |
| 16885 | ConstExprValue *type_info_var = get_builtin_value(ira->codegen, "TypeInfo"); // TODO oops this global variable made it past code review |
| 16886 | assert(type_info_var->type->id == ZigTypeIdMetaType); |
| 16887 | assertNoError(ensure_complete_type(ira->codegen, type_info_var->data.x_type)); |
| 16890 | 16888 | |
| 16891 | | assertNoError(ensure_complete_type(ira->codegen, type_info_var->data.x_type)); |
| 16892 | | type_info_type = type_info_var->data.x_type; |
| 16893 | | assert(type_info_type->id == ZigTypeIdUnion); |
| 16894 | | } |
| 16889 | ZigType *type_info_type = type_info_var->data.x_type; // TODO oops this global variable made it past code review |
| 16890 | assert(type_info_type->id == ZigTypeIdUnion); |
| 16895 | 16891 | |
| 16896 | 16892 | if (type_name == nullptr && root == nullptr) |
| 16897 | 16893 | return type_info_type; |