[tint] Fix syntax_tree build

Missing utils:: namespace on TrimSuffix().

Change-Id: I184bee79dc2c807730c1be0a532b290441d5f4ae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132323
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton 2023-05-10 16:05:50 +00:00 committed by Dawn LUCI CQ
parent 05330ab9dd
commit c95576ed7b
1 changed files with 4 additions and 4 deletions

View File

@ -976,14 +976,14 @@ void GeneratorImpl::EmitForLoop(const ast::ForLoopStatement* stmt) {
case 0: // No initializer case 0: // No initializer
break; break;
case 1: // Single line initializer statement case 1: // Single line initializer statement
line() << TrimSuffix(init_buf.lines[0].content, ";"); line() << utils::TrimSuffix(init_buf.lines[0].content, ";");
break; break;
default: // Block initializer statement default: // Block initializer statement
for (size_t i = 1; i < init_buf.lines.size(); i++) { for (size_t i = 1; i < init_buf.lines.size(); i++) {
// Indent all by the first line // Indent all by the first line
init_buf.lines[i].indent += current_buffer_->current_indent; init_buf.lines[i].indent += current_buffer_->current_indent;
} }
line() << TrimSuffix(init_buf.String(), "\n"); line() << utils::TrimSuffix(init_buf.String(), "\n");
break; break;
} }
} }
@ -1004,14 +1004,14 @@ void GeneratorImpl::EmitForLoop(const ast::ForLoopStatement* stmt) {
case 0: // No continuing case 0: // No continuing
break; break;
case 1: // Single line continuing statement case 1: // Single line continuing statement
line() << TrimSuffix(cont_buf.lines[0].content, ";"); line() << utils::TrimSuffix(cont_buf.lines[0].content, ";");
break; break;
default: // Block continuing statement default: // Block continuing statement
for (size_t i = 1; i < cont_buf.lines.size(); i++) { for (size_t i = 1; i < cont_buf.lines.size(); i++) {
// Indent all by the first line // Indent all by the first line
cont_buf.lines[i].indent += current_buffer_->current_indent; cont_buf.lines[i].indent += current_buffer_->current_indent;
} }
line() << TrimSuffix(cont_buf.String(), "\n"); line() << utils::TrimSuffix(cont_buf.String(), "\n");
break; break;
} }
} }