Skip to content

Commit

Permalink
[wasm] Use StringRef::trim (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata committed Dec 27, 2023
1 parent 4128ede commit 4972a19
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions lld/wasm/InputFiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,16 +680,7 @@ Symbol *ObjFile::createUndefined(const WasmSymbol &sym, bool isCalledDirectly) {
llvm_unreachable("unknown symbol kind");
}


StringRef strip(StringRef s) {
while (s.starts_with(" ")) {
s = s.drop_front();
}
while (s.ends_with(" ")) {
s = s.drop_back();
}
return s;
}
StringRef strip(StringRef s) { return s.trim(' '); }

void StubFile::parse() {
bool first = true;
Expand Down

0 comments on commit 4972a19

Please sign in to comment.