From 48555cd4946c661df185fdb7a6a319e56757626c Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Tue, 27 Oct 2020 18:35:42 +0000 Subject: [PATCH] [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/ --- llvm/tools/llvm-readobj/ELFDumper.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp index 6bf0858..7a796ef 100644 --- a/llvm/tools/llvm-readobj/ELFDumper.cpp +++ b/llvm/tools/llvm-readobj/ELFDumper.cpp @@ -4665,11 +4665,9 @@ void GNUStyle::printVersionSymbolSection(const Elf_Shdr *Sec) { Expected 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(""); continue; } -- 2.7.4