Skip to content

Commit 0fc6ddd

Browse files
committed
Use till
1 parent dd4da0b commit 0fc6ddd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lld/ELF/ScriptParser.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,7 @@ SectionClassDesc *ScriptParser::readSectionClassDescription() {
613613
if (!script->sectionClasses.insert({CachedHashStringRef(name), desc}).second)
614614
setError("section class '" + name + "' already defined");
615615
expect("{");
616-
while (!errorCount() && !consume("}")) {
617-
StringRef tok = next();
616+
while (auto tok = till("}")) {
618617
if (tok == "(" || tok == ")") {
619618
setError("expected filename pattern");
620619
} else if (peek() == "(") {

0 commit comments

Comments
 (0)