diff options
| author | gingerBill <bill@gingerbill.org> | 2018-10-31 10:04:30 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-10-31 10:04:30 +0000 |
| commit | 6659ceb551c3d1959ab8b8aa3301f66973cf1aa6 (patch) | |
| tree | b40b3a2bac333840bb0e8420d2604aa4ee30cb9b /src/ir.cpp | |
| parent | 5aa591d8845d8803d9a59502e99bc666bead9a3f (diff) | |
Allow comparisons of `cstring`; Add `resize`
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 039b89954..7cfd8e113 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -3767,6 +3767,11 @@ irValue *ir_emit_comp(irProcedure *proc, TokenKind op_kind, irValue *left, irVal } if (is_type_string(a)) { + if (is_type_cstring(a)) { + left = ir_emit_conv(proc, left, t_string); + right = ir_emit_conv(proc, right, t_string); + } + char *runtime_proc = nullptr; switch (op_kind) { case Token_CmpEq: runtime_proc = "string_eq"; break; |