diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-08-26 12:43:36 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-08-26 12:43:36 -0400 |
| commit | 73a7747a9cfb180a92fa0d98f9387d5ad1f47fd2 (patch) | |
| tree | 5b26647eecc6c7f709464678e48a300a8789d473 /src/ir.cpp | |
| parent | 6569bfc85e7de5229dd5b665e84070970d28653d (diff) | |
| download | zig-73a7747a9cfb180a92fa0d98f9387d5ad1f47fd2.tar.gz zig-73a7747a9cfb180a92fa0d98f9387d5ad1f47fd2.zip | |
fix some compile error regressions
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index bd782b4fdc..a6c14885ef 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -152,12 +152,6 @@ struct ConstCastBadAllowsZero { }; -enum UndefAllowed { - UndefOk, - UndefBad, - LazyOk, -}; - static IrInstruction *ir_gen_node(IrBuilder *irb, AstNode *node, Scope *scope); static IrInstruction *ir_gen_node_extra(IrBuilder *irb, AstNode *node, Scope *scope, LVal lval, ResultLoc *result_loc); @@ -6836,7 +6830,7 @@ static IrInstruction *ir_gen_asm_expr(IrBuilder *irb, Scope *scope, AstNode *nod const char modifier = *buf_ptr(asm_output->constraint); if (modifier != '=') { add_node_error(irb->codegen, node, - buf_sprintf("invalid modifier starting output constraint for '%s': '%c', only '=' is supported." + buf_sprintf("invalid modifier starting output constraint for '%s': '%c', only '=' is supported" " Compiler TODO: see https://github.com/ziglang/zig/issues/215", buf_ptr(asm_output->asm_symbolic_name), modifier)); return irb->codegen->invalid_instruction; @@ -6860,7 +6854,7 @@ static IrInstruction *ir_gen_asm_expr(IrBuilder *irb, Scope *scope, AstNode *nod uint32_t len = asm_token.end - asm_token.start - 2; add_node_error(irb->codegen, node, - buf_sprintf("could not find '%.*s' in the inputs or outputs.", + buf_sprintf("could not find '%.*s' in the inputs or outputs", len, ptr)); return irb->codegen->invalid_instruction; } @@ -8114,6 +8108,9 @@ static IrInstruction *ir_gen_node_extra(IrBuilder *irb, AstNode *node, Scope *sc } IrInstruction *result = ir_gen_node_raw(irb, node, scope, lval, result_loc); if (result == irb->codegen->invalid_instruction) { + if (irb->exec->first_err_trace_msg == nullptr) { + irb->exec->first_err_trace_msg = irb->codegen->trace_err; + } src_assert(irb->exec->first_err_trace_msg != nullptr, node); } return result; |
