From aaecb8f7994d39b96a47741ac17862d3cfa8ed7f Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 24 Apr 2019 15:09:23 +0000 Subject: [PATCH] [llvm-objdump] Delete redundant check llvm-svn: 359102 --- llvm/tools/llvm-objdump/llvm-objdump.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp index 50a03643f645..8a3d6d7980f7 100644 --- a/llvm/tools/llvm-objdump/llvm-objdump.cpp +++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp @@ -1485,9 +1485,7 @@ void printDynamicRelocations(const ObjectFile *Obj) { outs() << "DYNAMIC RELOCATION RECORDS\n"; StringRef Fmt = Obj->getBytesInAddress() > 4 ? "%016" PRIx64 : "%08" PRIx64; - for (const SectionRef &Section : DynRelSec) { - if (Section.relocation_begin() == Section.relocation_end()) - continue; + for (const SectionRef &Section : DynRelSec) for (const RelocationRef &Reloc : Section.relocations()) { uint64_t Address = Reloc.getOffset(); SmallString<32> RelocName; @@ -1497,7 +1495,6 @@ void printDynamicRelocations(const ObjectFile *Obj) { outs() << format(Fmt.data(), Address) << " " << RelocName << " " << ValueStr << "\n"; } - } } // Returns true if we need to show LMA column when dumping section headers. We