aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-04-08 18:49:20 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-04-08 18:49:20 -0400
commitacd8f6ef184c031f672fa6d6a690d831344de4b4 (patch)
treefc4c75a16a6796586b9dd9eba7e8f4596cd09e08 /src/ir.cpp
parent8f4ad95777bb0fd14c095bf626dfc2928a7dddca (diff)
downloadzig-acd8f6ef184c031f672fa6d6a690d831344de4b4.tar.gz
zig-acd8f6ef184c031f672fa6d6a690d831344de4b4.zip
fixups from rebase
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp31
1 files changed, 4 insertions, 27 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 5fb4a61ef9..5348e8ba13 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -2153,12 +2153,12 @@ static IrInstruction *ir_build_unwrap_err_payload_from(IrBuilder *irb, IrInstruc
}
static IrInstruction *ir_build_fn_proto(IrBuilder *irb, Scope *scope, AstNode *source_node,
- IrInstruction **param_types, IrInstruction *align_value, IrInstruction *return_type, IrInstruction *async_allocator_type_value, bool is_var_args)
+ IrInstruction **param_types, IrInstruction *align_value, IrInstruction *return_type,
+ IrInstruction *async_allocator_type_value, bool is_var_args)
{
IrInstructionFnProto *instruction = ir_build_instruction<IrInstructionFnProto>(irb, scope, source_node);
instruction->param_types = param_types;
instruction->align_value = align_value;
- instruction->async_allocator_type_value = async_allocator_type_value;
instruction->return_type = return_type;
instruction->async_allocator_type_value = async_allocator_type_value;
instruction->is_var_args = is_var_args;
@@ -2647,17 +2647,6 @@ static IrInstruction *ir_build_coro_alloc_helper(IrBuilder *irb, Scope *scope, A
return &instruction->base;
}
-static IrInstruction *ir_build_add_implicit_return_type(IrBuilder *irb, Scope *scope, AstNode *source_node,
- IrInstruction *value)
-{
- IrInstructionAddImplicitReturnType *instruction = ir_build_instruction<IrInstructionAddImplicitReturnType>(irb, scope, source_node);
- instruction->value = value;
-
- ir_ref_instruction(value, irb->current_basic_block);
-
- return &instruction->base;
-}
-
static IrInstruction *ir_build_atomic_rmw(IrBuilder *irb, Scope *scope, AstNode *source_node,
IrInstruction *operand_type, IrInstruction *ptr, IrInstruction *op, IrInstruction *operand,
IrInstruction *ordering, AtomicRmwOp resolved_op, AtomicOrder resolved_ordering)
@@ -6052,13 +6041,6 @@ static IrInstruction *ir_gen_fn_proto(IrBuilder *irb, Scope *parent_scope, AstNo
return irb->codegen->invalid_instruction;
}
- IrInstruction *async_allocator_type_value = nullptr;
- if (node->data.fn_proto.async_allocator_type != nullptr) {
- async_allocator_type_value = ir_gen_node(irb, node->data.fn_proto.async_allocator_type, parent_scope);
- if (async_allocator_type_value == irb->codegen->invalid_instruction)
- return irb->codegen->invalid_instruction;
- }
-
IrInstruction *return_type;
if (node->data.fn_proto.return_var_token == nullptr) {
if (node->data.fn_proto.return_type == nullptr) {
@@ -6079,7 +6061,8 @@ static IrInstruction *ir_gen_fn_proto(IrBuilder *irb, Scope *parent_scope, AstNo
return irb->codegen->invalid_instruction;
}
- return ir_build_fn_proto(irb, parent_scope, node, param_types, align_value, return_type, async_allocator_type_value, is_var_args);
+ return ir_build_fn_proto(irb, parent_scope, node, param_types, align_value, return_type,
+ async_allocator_type_value, is_var_args);
}
static IrInstruction *ir_gen_cancel(IrBuilder *irb, Scope *parent_scope, AstNode *node) {
@@ -16757,12 +16740,6 @@ static TypeTableEntry *ir_analyze_instruction_fn_proto(IrAnalyze *ira, IrInstruc
return ira->codegen->builtin_types.entry_invalid;
}
- if (instruction->async_allocator_type_value != nullptr) {
- fn_type_id.async_allocator_type = ir_resolve_type(ira, instruction->async_allocator_type_value->other);
- if (type_is_invalid(fn_type_id.async_allocator_type))
- return ira->codegen->builtin_types.entry_invalid;
- }
-
IrInstruction *return_type_value = instruction->return_type->other;
fn_type_id.return_type = ir_resolve_type(ira, return_type_value);
if (type_is_invalid(fn_type_id.return_type))