diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-07-13 14:53:54 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-07-13 14:53:54 -0400 |
| commit | c87102c3046cfabffe0e680e4793f5ce2a88caa2 (patch) | |
| tree | 766e843ae55652c47a4735f67765860ad8385406 /src/ir.cpp | |
| parent | 171f33b961fd19a91bc9dc80e1b69865d06f3ff2 (diff) | |
| download | zig-c87102c3046cfabffe0e680e4793f5ce2a88caa2.tar.gz zig-c87102c3046cfabffe0e680e4793f5ce2a88caa2.zip | |
ir_get_ref: delete unnecessary and probably buggy code
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 1b197d3ed1..3007bbcf64 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -9593,23 +9593,6 @@ static IrInstruction *ir_get_ref(IrAnalyze *ira, IrInstruction *source_instructi if (type_is_invalid(value->value.type)) return ira->codegen->invalid_instruction; - if (value->id == IrInstructionIdLoadPtr) { - IrInstructionLoadPtr *load_ptr_inst = (IrInstructionLoadPtr *) value; - - if (load_ptr_inst->ptr->value.type->data.pointer.is_const) { - return load_ptr_inst->ptr; - } - - type_ensure_zero_bits_known(ira->codegen, value->value.type); - if (type_is_invalid(value->value.type)) { - return ira->codegen->invalid_instruction; - } - - if (!type_has_bits(value->value.type)) { - return load_ptr_inst->ptr; - } - } - if (instr_is_comptime(value)) { ConstExprValue *val = ir_resolve_const(ira, value, UndefOk); if (!val) |
