[llvm] r260963 - Move DynRegionInfo out of the ELFDumper.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 16 06:27:33 PST 2016
Author: rafael
Date: Tue Feb 16 08:27:33 2016
New Revision: 260963
URL: http://llvm.org/viewvc/llvm-project?rev=260963&view=rev
Log:
Move DynRegionInfo out of the ELFDumper.
This reduces indentation in preparation to adding a bit more code to it.
Extracted from r260488.
Modified:
llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
Modified: llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/ELFDumper.cpp?rev=260963&r1=260962&r2=260963&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/ELFDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/ELFDumper.cpp Tue Feb 16 08:27:33 2016
@@ -48,6 +48,17 @@ namespace {
template <class ELFT> class DumpStyle;
+/// \brief Represents a region described by entries in the .dynamic table.
+struct DynRegionInfo {
+ DynRegionInfo() : Addr(nullptr), Size(0), EntSize(0) {}
+ /// \brief Address in current address space.
+ const void *Addr;
+ /// \brief Size in bytes of the region.
+ uint64_t Size;
+ /// \brief Size of each entity in the region.
+ uint64_t EntSize;
+};
+
template<typename ELFT>
class ELFDumper : public ObjDumper {
public:
@@ -101,17 +112,6 @@ private:
typedef typename ELFO::Elf_Verdef Elf_Verdef;
typedef typename ELFO::Elf_Verdaux Elf_Verdaux;
- /// \brief Represents a region described by entries in the .dynamic table.
- struct DynRegionInfo {
- DynRegionInfo() : Addr(nullptr), Size(0), EntSize(0) {}
- /// \brief Address in current address space.
- const void *Addr;
- /// \brief Size in bytes of the region.
- uintX_t Size;
- /// \brief Size of each entity in the region.
- uintX_t EntSize;
- };
-
void parseDynamicTable(ArrayRef<const Elf_Phdr *> LoadSegments);
void printSymbolsHelper(bool IsDynamic);
More information about the llvm-commits
mailing list