diff options
| author | gingerBill <bill@gingerbill.org> | 2021-08-01 23:56:17 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-08-01 23:56:17 +0100 |
| commit | be76da2c90824f3671328957e8d513bba605c086 (patch) | |
| tree | 1b16bc4b4836c094c55356c4efc23aef84a43c77 /src/llvm_backend.cpp | |
| parent | b1a8357f509d0dfa2d496746831dfb1008ab94a7 (diff) | |
Begin optimizing tokenizer; Replace `gb_utf8_decode` with `utf8_decode` (CC but easier to change later)
Diffstat (limited to 'src/llvm_backend.cpp')
| -rw-r--r-- | src/llvm_backend.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp index a59e1baa9..743d465e8 100644 --- a/src/llvm_backend.cpp +++ b/src/llvm_backend.cpp @@ -4712,7 +4712,7 @@ void lb_build_unroll_range_stmt(lbProcedure *p, AstUnrollRangeStmt *rs, Scope *s Rune codepoint = 0; isize offset = 0; do { - isize width = gb_utf8_decode(str.text+offset, str.len-offset, &codepoint); + isize width = utf8_decode(str.text+offset, str.len-offset, &codepoint); if (val0_type) lb_addr_store(p, val0_addr, lb_const_value(m, val0_type, exact_value_i64(codepoint))); if (val1_type) lb_addr_store(p, val1_addr, lb_const_value(m, val1_type, exact_value_i64(offset))); lb_build_stmt(p, rs->body); @@ -6563,7 +6563,7 @@ lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, bool allow_loc LLVMValueRef *elems = gb_alloc_array(permanent_allocator(), LLVMValueRef, cast(isize)count); for (i64 i = 0; i < count && offset < s.len; i++) { - width = gb_utf8_decode(s.text+offset, s.len-offset, &rune); + width = utf8_decode(s.text+offset, s.len-offset, &rune); offset += width; elems[i] = LLVMConstInt(et, rune, true); |