There is no reason to report an error in printSectionHeaders(), we can report
a warning and continue dumping. This is what the patch does.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM, with one suggestion. Thanks!
| llvm/tools/llvm-readobj/ELFDumper.cpp | ||
|---|---|---|
| 3829–3834 | Consider using the following instead to limit the scope of SecStrTableOrErr: if (Expected<StringRef> SecStrTableOrErr =
Obj->getSectionStringTable(Sections, this->dumper()->WarningHandler);)
SecStrTable = *SecStrTableOrErr;
else
this->reportUniqueWarning(SecStrTableOrErr.takeError());(I don't mind if you don't want to do that though) | |
| llvm/tools/llvm-readobj/ELFDumper.cpp | ||
|---|---|---|
| 3829–3834 | Will do, I like the idea to limit scopes where possible. Thanks! | |
Consider using the following instead to limit the scope of SecStrTableOrErr:
if (Expected<StringRef> SecStrTableOrErr = Obj->getSectionStringTable(Sections, this->dumper()->WarningHandler);) SecStrTable = *SecStrTableOrErr; else this->reportUniqueWarning(SecStrTableOrErr.takeError());(I don't mind if you don't want to do that though)