diff options
| author | gingerBill <bill@gingerbill.org> | 2018-08-28 20:03:27 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-08-28 20:03:27 +0100 |
| commit | ae2af8315ee8538774efe2cf608d4be50be5305a (patch) | |
| tree | d810da5415b8af9808d40153b9499b6e91dc90fd /src/ir.cpp | |
| parent | adbb3bb75fc161988fb6e4fdf07260601a846aaa (diff) | |
Allow for default parameters that are non-constant entities, but not any non-constant expression
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 476a7fba0..daa0770d2 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -5128,6 +5128,9 @@ irValue *ir_build_expr_internal(irProcedure *proc, Ast *expr) { // args[i] = GB_PANIC("TODO ParameterValue_Location"); break; + case ParameterValue_Value: + args[i] = ir_build_expr(proc, e->Variable.param_value.ast_value); + break; } } else { args[i] = ir_emit_conv(proc, args[i], e->type); @@ -5221,6 +5224,9 @@ irValue *ir_build_expr_internal(irProcedure *proc, Ast *expr) { case ParameterValue_Location: args[arg_index++] = ir_emit_source_code_location(proc, proc_name, pos); break; + case ParameterValue_Value: + args[arg_index++] = ir_build_expr(proc, e->Variable.param_value.ast_value); + break; } } } @@ -5312,6 +5318,9 @@ irValue *ir_build_expr_internal(irProcedure *proc, Ast *expr) { case ParameterValue_Location: args[i] = ir_emit_source_code_location(proc, proc_name, pos); break; + case ParameterValue_Value: + args[i] = ir_build_expr(proc, e->Variable.param_value.ast_value); + break; } } } |