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...@@ -5057,7 +5057,7 @@ static TypeTableEntry *ir_analyze_ref(IrAnalyze *ira, IrInstruction *source_inst
5057 return ira->codegen->builtin_types.entry_invalid;5057 return ira->codegen->builtin_types.entry_invalid;
50585058
5059 bool is_inline = ir_should_inline(&ira->new_irb);5059 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)) {
5061 ConstExprValue *val = ir_resolve_const(ira, value, UndefBad);5061 ConstExprValue *val = ir_resolve_const(ira, value, UndefBad);
5062 if (!val)5062 if (!val)
5063 return ira->codegen->builtin_types.entry_invalid;5063 return ira->codegen->builtin_types.entry_invalid;
...@@ -6770,7 +6770,7 @@ static TypeTableEntry *ir_analyze_decl_ref(IrAnalyze *ira, IrInstruction *source...@@ -6770,7 +6770,7 @@ static TypeTableEntry *ir_analyze_decl_ref(IrAnalyze *ira, IrInstruction *source
6770 const_val->data.x_type = tld_container->type_entry;6770 const_val->data.x_type = tld_container->type_entry;
67716771
6772 bool ptr_is_const = true;6772 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,
6774 depends_on_compile_var, ConstPtrSpecialNone, ptr_is_const);6774 depends_on_compile_var, ConstPtrSpecialNone, ptr_is_const);
6775 }6775 }
6776 case TldIdTypeDef:6776 case TldIdTypeDef:
...@@ -6785,7 +6785,7 @@ static TypeTableEntry *ir_analyze_decl_ref(IrAnalyze *ira, IrInstruction *source...@@ -6785,7 +6785,7 @@ static TypeTableEntry *ir_analyze_decl_ref(IrAnalyze *ira, IrInstruction *source
6785 const_val->data.x_type = tld_typedef->type_entry;6785 const_val->data.x_type = tld_typedef->type_entry;
67866786
6787 bool ptr_is_const = true;6787 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,
6789 depends_on_compile_var, ConstPtrSpecialNone, ptr_is_const);6789 depends_on_compile_var, ConstPtrSpecialNone, ptr_is_const);
6790 }6790 }
6791 }6791 }