[llvm] r359102 - [llvm-objdump] Delete redundant check
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 24 08:09:23 PDT 2019
Author: maskray
Date: Wed Apr 24 08:09:23 2019
New Revision: 359102
URL: http://llvm.org/viewvc/llvm-project?rev=359102&view=rev
Log:
[llvm-objdump] Delete redundant check
Modified:
llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
Modified: llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp?rev=359102&r1=359101&r2=359102&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp Wed Apr 24 08:09:23 2019
@@ -1485,9 +1485,7 @@ void printDynamicRelocations(const Objec
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 Objec
outs() << format(Fmt.data(), Address) << " " << RelocName << " "
<< ValueStr << "\n";
}
- }
}
// Returns true if we need to show LMA column when dumping section headers. We
More information about the llvm-commits
mailing list