This is an archive of the discontinued LLVM Phabricator instance.

[llvm-readobj] - Change the error to warning when a section name is unknown.
ClosedPublic

Authored by grimar on Feb 5 2020, 6:07 AM.

Details

Summary

We reported the error in this case.
But it was asked (https://reviews.llvm.org/D73193#inline-665595) to convert it
to a warning. This patch does it.

Diff Detail

Event Timeline

grimar created this revision.Feb 5 2020, 6:07 AM
Herald added a project: Restricted Project. · View Herald Transcript
jhenderson added inline comments.Feb 5 2020, 6:44 AM
llvm/test/tools/llvm-readobj/ELF/invalid-shstrndx.test
16–34

Perhaps worth showing what is printed for this and subsequent section headers?

MaskRay accepted this revision.Feb 5 2020, 5:32 PM
MaskRay added inline comments.
llvm/tools/llvm-readobj/ELFDumper.cpp
5755
if (Expected<StringRef> SecNameOrErr =
        Obj->getSectionName(&Sec, this->WarningHandler))
  Name = *SecNameOrErr;
else
  this->reportUniqueWarning(SecNameOrErr.takeError());
This revision is now accepted and ready to land.Feb 5 2020, 5:32 PM

Allow a situation

It may be more accurate to say changing an error to a warning.

grimar updated this revision to Diff 242820.Feb 6 2020, 12:46 AM
grimar marked 3 inline comments as done.
grimar retitled this revision from [llvm-readobj] - Allow a situation when a section name is unknown. to [llvm-readobj] - Change the error to warning when a section name is unknown..
  • Addressed review comments.
This revision was automatically updated to reflect the committed changes.