diff options
author | Kazu Hirata <kazu@google.com> | 2023-12-26 23:56:21 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2023-12-26 23:56:21 -0800 |
commit | 4972a19702a00ce0a66d66d38b982c706a008ec8 (patch) | |
tree | 97c701630118ad1969e988c02e480c8bec889188 | |
parent | 4128edeaadf82245f7ade74900ca3eae0ff94e6a (diff) | |
download | llvm-4972a19702a00ce0a66d66d38b982c706a008ec8.zip llvm-4972a19702a00ce0a66d66d38b982c706a008ec8.tar.gz llvm-4972a19702a00ce0a66d66d38b982c706a008ec8.tar.bz2 |
[wasm] Use StringRef::trim (NFC)
-rw-r--r-- | lld/wasm/InputFiles.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/lld/wasm/InputFiles.cpp b/lld/wasm/InputFiles.cpp index 96ac1e1..5709a5c 100644 --- a/lld/wasm/InputFiles.cpp +++ b/lld/wasm/InputFiles.cpp @@ -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; |