[llvm] 48555cd - [llvm-readobj] Remove duplicate inner if() condition. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 27 11:36:53 PDT 2020
Author: Simon Pilgrim
Date: 2020-10-27T18:36:04Z
New Revision: 48555cd4946c661df185fdb7a6a319e56757626c
URL: https://github.com/llvm/llvm-project/commit/48555cd4946c661df185fdb7a6a319e56757626c
DIFF: https://github.com/llvm/llvm-project/commit/48555cd4946c661df185fdb7a6a319e56757626c.diff
LOG: [llvm-readobj] Remove duplicate inner if() condition. NFCI.
This should have been removed when rG445c3fdd2ae8 simplified the conditions.
Reported as "Snippet 5" in https://www.viva64.com/en/b/0771/
Added:
Modified:
llvm/tools/llvm-readobj/ELFDumper.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp
index 6bf08585c873..7a796ef15f2a 100644
--- a/llvm/tools/llvm-readobj/ELFDumper.cpp
+++ b/llvm/tools/llvm-readobj/ELFDumper.cpp
@@ -4665,11 +4665,9 @@ void GNUStyle<ELFT>::printVersionSymbolSection(const Elf_Shdr *Sec) {
Expected<StringRef> NameOrErr =
this->dumper().getSymbolVersionByIndex(Ndx, IsDefault);
if (!NameOrErr) {
- if (!NameOrErr)
- this->reportUniqueWarning(
- createError("unable to get a version for entry " + Twine(I) +
- " of " + describe(this->Obj, *Sec) + ": " +
- toString(NameOrErr.takeError())));
+ this->reportUniqueWarning(createError(
+ "unable to get a version for entry " + Twine(I) + " of " +
+ describe(this->Obj, *Sec) + ": " + toString(NameOrErr.takeError())));
Versions.emplace_back("<corrupt>");
continue;
}
More information about the llvm-commits
mailing list