Skip to content

Commit 4972a19

Browse files
[wasm] Use StringRef::trim (NFC)
1 parent 4128ede commit 4972a19

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

lld/wasm/InputFiles.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -680,16 +680,7 @@ Symbol *ObjFile::createUndefined(const WasmSymbol &sym, bool isCalledDirectly) {
680680
llvm_unreachable("unknown symbol kind");
681681
}
682682

683-
684-
StringRef strip(StringRef s) {
685-
while (s.starts_with(" ")) {
686-
s = s.drop_front();
687-
}
688-
while (s.ends_with(" ")) {
689-
s = s.drop_back();
690-
}
691-
return s;
692-
}
683+
StringRef strip(StringRef s) { return s.trim(' '); }
693684

694685
void StubFile::parse() {
695686
bool first = true;

0 commit comments

Comments
 (0)