diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-11-27 01:45:29 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-11-27 01:45:29 -0500 |
| commit | 9e7c47597985a4a35912d2b1f800d3af05597a3a (patch) | |
| tree | d95fe1f12b383d8be481c8c1fe444e2bb6bbf7c0 /src/ir.cpp | |
| parent | e5325c7ef3c5b0fe9afbcba59cd269608d65dda0 (diff) | |
| download | zig-9e7c47597985a4a35912d2b1f800d3af05597a3a.tar.gz zig-9e7c47597985a4a35912d2b1f800d3af05597a3a.zip | |
IR: silence irrelevant function prototype errors
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 33980b6127..9362a6c618 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -2523,6 +2523,11 @@ static IrInstruction *ir_lval_wrap(IrBuilder *irb, IrInstruction *value, LValPur return ir_build_ref(irb, value->source_node, value); } +static IrInstruction *ir_gen_type_literal(IrBuilder *irb, AstNode *node) { + assert(node->type == NodeTypeTypeLiteral); + return ir_build_const_type(irb, node, irb->codegen->builtin_types.entry_type); +} + static IrInstruction *ir_gen_node_raw(IrBuilder *irb, AstNode *node, BlockContext *block_context, LValPurpose lval) { @@ -2580,6 +2585,8 @@ static IrInstruction *ir_gen_node_raw(IrBuilder *irb, AstNode *node, BlockContex return ir_gen_label(irb, node); case NodeTypeGoto: return ir_gen_goto(irb, node); + case NodeTypeTypeLiteral: + return ir_lval_wrap(irb, ir_gen_type_literal(irb, node), lval); case NodeTypeUnwrapErrorExpr: case NodeTypeDefer: case NodeTypeSliceExpr: @@ -2588,7 +2595,6 @@ static IrInstruction *ir_gen_node_raw(IrBuilder *irb, AstNode *node, BlockContex case NodeTypeCharLiteral: case NodeTypeZeroesLiteral: case NodeTypeErrorType: - case NodeTypeTypeLiteral: case NodeTypeVarLiteral: case NodeTypeRoot: case NodeTypeFnProto: |
