diff options
author | Sam Clegg <sbc@chromium.org> | 2023-04-04 10:24:40 -0700 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2023-06-10 15:58:16 -0700 |
commit | 7cbf1a2591520c2491aa35339f227775f4d3adf6 (patch) | |
tree | e74f3be630ad2243437e6ddd4ae03d71fdfeee7b /lld/wasm/Driver.cpp | |
parent | 10c3bdc04183cba06fbe7318d1a496fa192f12df (diff) | |
download | llvm-release/16.x.zip llvm-release/16.x.tar.gz llvm-release/16.x.tar.bz2 |
[lld][WebAssembly] Fix stub library parsing with windows line endingsllvmorg-16.0.6release/16.x
Also, fix checking of first line in ::parse. We can't use the
::getLines helper here since that already does comment stripping
internally.
Differential Revision: https://reviews.llvm.org/D147548
(cherry picked from commit d9d840cdaf51a9795930750d1b91d614a3849137)
Diffstat (limited to 'lld/wasm/Driver.cpp')
-rw-r--r-- | lld/wasm/Driver.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/wasm/Driver.cpp b/lld/wasm/Driver.cpp index 8f7ed8b8..762d4c9 100644 --- a/lld/wasm/Driver.cpp +++ b/lld/wasm/Driver.cpp @@ -281,7 +281,7 @@ void LinkerDriver::addFile(StringRef path) { files.push_back(createObjectFile(mbref)); break; case file_magic::unknown: - if (mbref.getBuffer().starts_with("#STUB\n")) { + if (mbref.getBuffer().starts_with("#STUB")) { files.push_back(make<StubFile>(mbref)); break; } |