[llvm-objdump] Delete redundant check

llvm-svn: 359102
This commit is contained in:
Fangrui Song 2019-04-24 15:09:23 +00:00
parent 93a47a6291
commit aaecb8f799
1 changed files with 1 additions and 4 deletions

View File

@ -1485,9 +1485,7 @@ void printDynamicRelocations(const ObjectFile *Obj) {
outs() << "DYNAMIC RELOCATION RECORDS\n"; outs() << "DYNAMIC RELOCATION RECORDS\n";
StringRef Fmt = Obj->getBytesInAddress() > 4 ? "%016" PRIx64 : "%08" PRIx64; StringRef Fmt = Obj->getBytesInAddress() > 4 ? "%016" PRIx64 : "%08" PRIx64;
for (const SectionRef &Section : DynRelSec) { for (const SectionRef &Section : DynRelSec)
if (Section.relocation_begin() == Section.relocation_end())
continue;
for (const RelocationRef &Reloc : Section.relocations()) { for (const RelocationRef &Reloc : Section.relocations()) {
uint64_t Address = Reloc.getOffset(); uint64_t Address = Reloc.getOffset();
SmallString<32> RelocName; SmallString<32> RelocName;
@ -1498,7 +1496,6 @@ void printDynamicRelocations(const ObjectFile *Obj) {
<< ValueStr << "\n"; << ValueStr << "\n";
} }
} }
}
// Returns true if we need to show LMA column when dumping section headers. We // Returns true if we need to show LMA column when dumping section headers. We
// show it only when the platform is ELF and either we have at least one section // show it only when the platform is ELF and either we have at least one section