This is an archive of the discontinued LLVM Phabricator instance.

[lld][WebAssembly] Fix stub library parsing with windows line endings
ClosedPublic

Authored by sbc100 on Apr 4 2023, 10:31 AM.

Details

Summary

Also, fix checking of first line in ::parse. We can't use the
::getLines helper here since that already does comment stripping
internally.

Diff Detail

Event Timeline

sbc100 created this revision.Apr 4 2023, 10:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2023, 10:31 AM
Herald added subscribers: pmatos, asb, wingo and 5 others. · View Herald Transcript
sbc100 requested review of this revision.Apr 4 2023, 10:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 4 2023, 10:31 AM
sbc100 updated this revision to Diff 510854.Apr 4 2023, 10:33 AM
  • revert
dschuff accepted this revision.Apr 4 2023, 11:53 AM
dschuff added inline comments.
lld/wasm/InputFiles.cpp
696

I think the SmallVector docs (https://llvm.org/doxygen/classllvm_1_1SmallVector.html#details) recommend leaving out the 2nd template parameter if we don't have a particular best choice for it. 0 seems too small since we know there will be at least a few lines (or maybe just use std::vector since it seems likely there will be heap allocation anyway?)

This revision is now accepted and ready to land.Apr 4 2023, 11:53 AM
sbc100 updated this revision to Diff 510874.Apr 4 2023, 11:54 AM
  • feedback
This revision was landed with ongoing or failed builds.Apr 4 2023, 11:55 AM
This revision was automatically updated to reflect the committed changes.