aboutsummaryrefslogtreecommitdiff
path: root/lld
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-12-26 23:56:21 -0800
committerKazu Hirata <kazu@google.com>2023-12-26 23:56:21 -0800
commit4972a19702a00ce0a66d66d38b982c706a008ec8 (patch)
tree97c701630118ad1969e988c02e480c8bec889188 /lld
parent4128edeaadf82245f7ade74900ca3eae0ff94e6a (diff)
downloadllvm-4972a19702a00ce0a66d66d38b982c706a008ec8.zip
llvm-4972a19702a00ce0a66d66d38b982c706a008ec8.tar.gz
llvm-4972a19702a00ce0a66d66d38b982c706a008ec8.tar.bz2
[wasm] Use StringRef::trim (NFC)
Diffstat (limited to 'lld')
-rw-r--r--lld/wasm/InputFiles.cpp11
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;