aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-02-11 23:47:46 +0000
committergingerBill <bill@gingerbill.org>2018-02-11 23:47:46 +0000
commit2ce55783d2c9cfb72da5bc4a51556d9938b6124a (patch)
tree895823ef7c19c221f2982da49321e9bb6b981401 /src
parent14eeee40b28c308f894090f0fdb9521ab002952c (diff)
Fix `make`
Diffstat (limited to 'src')
-rw-r--r--src/ir.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index c6093948c..a28d28739 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -4272,7 +4272,7 @@ irValue *ir_build_builtin_proc(irProcedure *proc, AstNode *expr, TypeAndValue tv
ir_emit_slice_bounds_check(proc, ast_node_token(ce->args[1]), v_zero, len, false);
irValue *slice_size = len;
- if (eal != 1) {
+ if (esz != 1) {
slice_size = ir_emit_arith(proc, Token_Mul, elem_size, len, t_int);
}
@@ -5578,7 +5578,10 @@ irAddr ir_build_addr(irProcedure *proc, AstNode *expr) {
case_end;
case_ast_node(be, BinaryExpr, expr);
- GB_PANIC("Invalid binary expression for ir_build_addr: %.*s\n", LIT(be->op.string));
+ irValue *v = ir_build_expr(proc, expr);
+ Type *t = ir_type(v);
+ GB_ASSERT(is_type_pointer(t));
+ return ir_addr(v);
case_end;
case_ast_node(ie, IndexExpr, expr);