authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-12-18 00:53:29-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-12-18 00:53:29-05:00
log69cf0ea56877a6f9bae51a35cffde371bf142567
tree60f34e861c3aa4615691eeb87c8d6f9a70dcea48
parent3e4194bf9e0ccca122049be730ede0a2ca208c85

IR: fix type of decls accessed via namespace


1 files changed, 3 insertions(+), 3 deletions(-)

src/ir.cpp+3-3
......@@ -5057,7 +5057,7 @@ static TypeTableEntry *ir_analyze_ref(IrAnalyze *ira, IrInstruction *source_inst
50575057 return ira->codegen->builtin_types.entry_invalid;
50585058
50595059 bool is_inline = ir_should_inline(&ira->new_irb);
5060 if (is_inline || value->static_value.special != ConstValSpecialRuntime) {
5060 if (is_inline || instr_is_comptime(value)) {
50615061 ConstExprValue *val = ir_resolve_const(ira, value, UndefBad);
50625062 if (!val)
50635063 return ira->codegen->builtin_types.entry_invalid;
......@@ -6770,7 +6770,7 @@ static TypeTableEntry *ir_analyze_decl_ref(IrAnalyze *ira, IrInstruction *source
67706770 const_val->data.x_type = tld_container->type_entry;
67716771
67726772 bool ptr_is_const = true;
6773 return ir_analyze_const_ptr(ira, source_instruction, const_val, tld_container->type_entry,
6773 return ir_analyze_const_ptr(ira, source_instruction, const_val, ira->codegen->builtin_types.entry_type,
67746774 depends_on_compile_var, ConstPtrSpecialNone, ptr_is_const);
67756775 }
67766776 case TldIdTypeDef:
......@@ -6785,7 +6785,7 @@ static TypeTableEntry *ir_analyze_decl_ref(IrAnalyze *ira, IrInstruction *source
67856785 const_val->data.x_type = tld_typedef->type_entry;
67866786
67876787 bool ptr_is_const = true;
6788 return ir_analyze_const_ptr(ira, source_instruction, const_val, tld_typedef->type_entry,
6788 return ir_analyze_const_ptr(ira, source_instruction, const_val, ira->codegen->builtin_types.entry_type,
67896789 depends_on_compile_var, ConstPtrSpecialNone, ptr_is_const);
67906790 }
67916791 }