This is an archive of the discontinued LLVM Phabricator instance.

ELF: Report multiple errors from the driver.
ClosedPublic

Authored by ruiu on Jan 27 2016, 12:24 PM.

Details

Reviewers
rafael
Summary

This patch let the driver keep going until it parses all
command line options.

Diff Detail

Event Timeline

ruiu updated this revision to Diff 46165.Jan 27 2016, 12:24 PM
ruiu retitled this revision from to ELF: Report multiple errors from the driver..
ruiu updated this object.
ruiu added a reviewer: rafael.
ruiu added a subscriber: llvm-commits.
ruiu updated this revision to Diff 46167.Jan 27 2016, 12:30 PM
  • Made the code a bit shorter by changing the return type of error.
rafael accepted this revision.Jan 28 2016, 5:35 PM
rafael edited edge metadata.

LGTM with two nits.

ELF/Driver.cpp
68–71

This is a broken file case, I would leave it for another patch.

86

Same here.

This revision is now accepted and ready to land.Jan 28 2016, 5:35 PM
ruiu added inline comments.Jan 28 2016, 5:55 PM
ELF/Driver.cpp
68–71

Fair. Done.

ruiu closed this revision.Jan 28 2016, 5:55 PM
grimar added a subscriber: grimar.Jan 29 2016, 3:00 AM
grimar added inline comments.
ELF/Driver.cpp
128

This will not work. Problem is that searchLibrary() returns std::string which is destroyed after assigning buffer pointer to StringRef. Buffer is filled with garbage in debug and some tests under windows + msvs2015/debug were failing because of that.
r259186 fixes it:

std::string Path = searchLibrary(Name);