aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-10-04 18:14:57 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-10-04 18:14:57 -0400
commitd07413f9b77a1e8e27ba09d2183ba5d614268c76 (patch)
treed2b4208a1fe15dbf8d3f883fbc14f02e8f005240 /src/ir.cpp
parent23b07ad8d25809baa3169f64d9c7be980501352d (diff)
downloadzig-d07413f9b77a1e8e27ba09d2183ba5d614268c76.tar.gz
zig-d07413f9b77a1e8e27ba09d2183ba5d614268c76.zip
fix missing .h files
closes #1634
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 09d6fca7e7..c48b56255d 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -17153,6 +17153,7 @@ static Error ir_make_type_info_defs(IrAnalyze *ira, ConstExprValue *out_val, Sco
}
static ConstExprValue *create_ptr_like_type_info(IrAnalyze *ira, ZigType *ptr_type_entry) {
+ Error err;
ZigType *attrs_type;
uint32_t size_enum_index;
if (is_slice(ptr_type_entry)) {
@@ -17165,6 +17166,9 @@ static ConstExprValue *create_ptr_like_type_info(IrAnalyze *ira, ZigType *ptr_ty
zig_unreachable();
}
+ if ((err = type_resolve(ira->codegen, attrs_type->data.pointer.child_type, ResolveStatusAlignmentKnown)))
+ return nullptr;
+
ZigType *type_info_pointer_type = ir_type_info_get_type(ira, "Pointer", nullptr);
assertNoError(ensure_complete_type(ira->codegen, type_info_pointer_type));
@@ -17308,6 +17312,8 @@ static Error ir_make_type_info_value(IrAnalyze *ira, ZigType *type_entry, ConstE
case ZigTypeIdPointer:
{
result = create_ptr_like_type_info(ira, type_entry);
+ if (result == nullptr)
+ return ErrorSemanticAnalyzeFail;
break;
}
case ZigTypeIdArray:
@@ -17586,6 +17592,8 @@ static Error ir_make_type_info_value(IrAnalyze *ira, ZigType *type_entry, ConstE
{
if (type_entry->data.structure.is_slice) {
result = create_ptr_like_type_info(ira, type_entry);
+ if (result == nullptr)
+ return ErrorSemanticAnalyzeFail;
break;
}