[Lldb-commits] [lldb] r251119 - Fix Clang-tidy modernize-use-override warnings in source/Plugins/ObjectContainer and ObjectFile; other minor fixes.

Eugene Zelenko via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 23 09:56:07 PDT 2015


Author: eugenezelenko
Date: Fri Oct 23 11:56:07 2015
New Revision: 251119

URL: http://llvm.org/viewvc/llvm-project?rev=251119&view=rev
Log:
Fix Clang-tidy modernize-use-override warnings in source/Plugins/ObjectContainer and ObjectFile; other minor fixes.

Modified:
    lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
    lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.h
    lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
    lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h
    lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
    lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
    lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h

Modified: lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h?rev=251119&r1=251118&r2=251119&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h (original)
+++ lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h Fri Oct 23 11:56:07 2015
@@ -10,8 +10,11 @@
 #ifndef liblldb_ObjectContainerBSDArchive_h_
 #define liblldb_ObjectContainerBSDArchive_h_
 
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
 #include "lldb/Symbol/ObjectContainer.h"
-
 #include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/ConstString.h"
 #include "lldb/Host/FileSpec.h"
@@ -22,6 +25,14 @@ class ObjectContainerBSDArchive :
     public lldb_private::ObjectContainer
 {
 public:
+    ObjectContainerBSDArchive(const lldb::ModuleSP &module_sp,
+                              lldb::DataBufferSP& data_sp,
+                              lldb::offset_t data_offset,
+                              const lldb_private::FileSpec *file,
+                              lldb::offset_t offset,
+                              lldb::offset_t length);
+
+    ~ObjectContainerBSDArchive() override;
 
     //------------------------------------------------------------------
     // Static Functions
@@ -60,43 +71,33 @@ public:
     //------------------------------------------------------------------
     // Member Functions
     //------------------------------------------------------------------
-    ObjectContainerBSDArchive (const lldb::ModuleSP &module_sp,
-                               lldb::DataBufferSP& data_sp,
-                               lldb::offset_t data_offset,
-                               const lldb_private::FileSpec *file,
-                               lldb::offset_t offset,
-                               lldb::offset_t length);
-
-    virtual
-    ~ObjectContainerBSDArchive();
+    bool
+    ParseHeader() override;
 
-    virtual bool
-    ParseHeader ();
-
-    virtual size_t
-    GetNumObjects () const
+    size_t
+    GetNumObjects() const override
     {
         if (m_archive_sp)
             return m_archive_sp->GetNumObjects();
         return 0;
     }
-    virtual void
-    Dump (lldb_private::Stream *s) const;
 
-    virtual lldb::ObjectFileSP
-    GetObjectFile (const lldb_private::FileSpec *file);
+    void
+    Dump(lldb_private::Stream *s) const override;
+
+    lldb::ObjectFileSP
+    GetObjectFile(const lldb_private::FileSpec *file) override;
 
     //------------------------------------------------------------------
     // PluginInterface protocol
     //------------------------------------------------------------------
-    virtual lldb_private::ConstString
-    GetPluginName();
+    lldb_private::ConstString
+    GetPluginName() override;
 
-    virtual uint32_t
-    GetPluginVersion();
+    uint32_t
+    GetPluginVersion() override;
 
 protected:
-
     struct Object
     {
         Object();
@@ -127,6 +128,13 @@ protected:
         typedef std::shared_ptr<Archive> shared_ptr;
         typedef std::multimap<lldb_private::FileSpec, shared_ptr> Map;
 
+        Archive(const lldb_private::ArchSpec &arch,
+                const lldb_private::TimeValue &mod_time,
+                lldb::offset_t file_offset,
+                lldb_private::DataExtractor &data);
+
+        ~Archive();
+
         static Map &
         GetArchiveCache ();
 
@@ -146,13 +154,6 @@ protected:
                                      lldb::offset_t file_offset,
                                      lldb_private::DataExtractor &data);
 
-        Archive (const lldb_private::ArchSpec &arch,
-                 const lldb_private::TimeValue &mod_time,
-                 lldb::offset_t file_offset,
-                 lldb_private::DataExtractor &data);
-
-        ~Archive ();
-
         size_t
         GetNumObjects () const
         {
@@ -226,4 +227,4 @@ protected:
     Archive::shared_ptr m_archive_sp;
 };
 
-#endif  // liblldb_ObjectContainerBSDArchive_h_
+#endif // liblldb_ObjectContainerBSDArchive_h_

Modified: lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.h?rev=251119&r1=251118&r2=251119&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.h (original)
+++ lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.h Fri Oct 23 11:56:07 2015
@@ -10,15 +10,27 @@
 #ifndef liblldb_ObjectContainerUniversalMachO_h_
 #define liblldb_ObjectContainerUniversalMachO_h_
 
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
 #include "lldb/Symbol/ObjectContainer.h"
 #include "lldb/Host/FileSpec.h"
-
 #include "lldb/Utility/SafeMachO.h"
 
 class ObjectContainerUniversalMachO :
     public lldb_private::ObjectContainer
 {
 public:
+    ObjectContainerUniversalMachO(const lldb::ModuleSP &module_sp,
+                                  lldb::DataBufferSP& data_sp,
+                                  lldb::offset_t data_offset,
+                                  const lldb_private::FileSpec *file,
+                                  lldb::offset_t offset,
+                                  lldb::offset_t length);
+
+    ~ObjectContainerUniversalMachO() override;
+
     //------------------------------------------------------------------
     // Static Functions
     //------------------------------------------------------------------
@@ -56,39 +68,29 @@ public:
     //------------------------------------------------------------------
     // Member Functions
     //------------------------------------------------------------------
-    ObjectContainerUniversalMachO (const lldb::ModuleSP &module_sp,
-                                   lldb::DataBufferSP& data_sp,
-                                   lldb::offset_t data_offset,
-                                   const lldb_private::FileSpec *file,
-                                   lldb::offset_t offset,
-                                   lldb::offset_t length);
-
-    virtual
-    ~ObjectContainerUniversalMachO();
-
-    virtual bool
-    ParseHeader ();
-
-    virtual void
-    Dump (lldb_private::Stream *s) const;
+    bool
+    ParseHeader() override;
 
-    virtual size_t
-    GetNumArchitectures () const;
+    void
+    Dump(lldb_private::Stream *s) const override;
 
-    virtual bool
-    GetArchitectureAtIndex (uint32_t cpu_idx, lldb_private::ArchSpec& arch) const;
+    size_t
+    GetNumArchitectures() const override;
 
-    virtual lldb::ObjectFileSP
-    GetObjectFile (const lldb_private::FileSpec *file);
+    bool
+    GetArchitectureAtIndex(uint32_t cpu_idx, lldb_private::ArchSpec& arch) const override;
+
+    lldb::ObjectFileSP
+    GetObjectFile(const lldb_private::FileSpec *file) override;
 
     //------------------------------------------------------------------
     // PluginInterface protocol
     //------------------------------------------------------------------
-    virtual lldb_private::ConstString
-    GetPluginName();
+    lldb_private::ConstString
+    GetPluginName() override;
 
-    virtual uint32_t
-    GetPluginVersion();
+    uint32_t
+    GetPluginVersion() override;
 
 protected:
     llvm::MachO::fat_header m_header;
@@ -98,7 +100,6 @@ protected:
     ParseHeader (lldb_private::DataExtractor &data,
                  llvm::MachO::fat_header &header,
                  std::vector<llvm::MachO::fat_arch> &fat_archs);
-
 };
 
-#endif  // liblldb_ObjectContainerUniversalMachO_h_
+#endif // liblldb_ObjectContainerUniversalMachO_h_

Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h?rev=251119&r1=251118&r2=251119&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h Fri Oct 23 11:56:07 2015
@@ -10,9 +10,14 @@
 #ifndef liblldb_ObjectFileELF_h_
 #define liblldb_ObjectFileELF_h_
 
+// C Includes
 #include <stdint.h>
+
+// C++ Includes
 #include <vector>
 
+// Other libraries and framework includes
+// Project includes
 #include "lldb/lldb-private.h"
 #include "lldb/Host/FileSpec.h"
 #include "lldb/Symbol/ObjectFile.h"
@@ -59,6 +64,8 @@ class ObjectFileELF :
     public lldb_private::ObjectFile
 {
 public:
+    ~ObjectFileELF() override;
+
     //------------------------------------------------------------------
     // Static Functions
     //------------------------------------------------------------------
@@ -113,9 +120,6 @@ public:
     //------------------------------------------------------------------
     // ObjectFile Protocol.
     //------------------------------------------------------------------
-    virtual
-    ~ObjectFileELF();
-
     bool
     ParseHeader() override;
 
@@ -211,6 +215,7 @@ private:
     {
         lldb_private::ConstString section_name;
     };
+
     typedef std::vector<ELFSectionHeaderInfo>   SectionHeaderColl;
     typedef SectionHeaderColl::iterator         SectionHeaderCollIter;
     typedef SectionHeaderColl::const_iterator   SectionHeaderCollConstIter;
@@ -428,4 +433,4 @@ private:
     RefineModuleDetailsFromNote (lldb_private::DataExtractor &data, lldb_private::ArchSpec &arch_spec, lldb_private::UUID &uuid);
 };
 
-#endif // #ifndef liblldb_ObjectFileELF_h_
+#endif // liblldb_ObjectFileELF_h_

Modified: lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h?rev=251119&r1=251118&r2=251119&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h (original)
+++ lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h Fri Oct 23 11:56:07 2015
@@ -10,10 +10,13 @@
 #ifndef liblldb_ObjectFileJIT_h_
 #define liblldb_ObjectFileJIT_h_
 
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
 #include "lldb/Core/Address.h"
 #include "lldb/Symbol/ObjectFile.h"
 
-
 //----------------------------------------------------------------------
 // This class needs to be hidden as eventually belongs in a plugin that
 // will export the ObjectFile protocol
@@ -22,6 +25,11 @@ class ObjectFileJIT :
     public lldb_private::ObjectFile
 {
 public:
+    ObjectFileJIT(const lldb::ModuleSP &module_sp,
+                  const lldb::ObjectFileJITDelegateSP &delegate_sp);
+
+    ~ObjectFileJIT() override;
+
     //------------------------------------------------------------------
     // Static Functions
     //------------------------------------------------------------------
@@ -62,81 +70,77 @@ public:
     //------------------------------------------------------------------
     // Member Functions
     //------------------------------------------------------------------
-    ObjectFileJIT (const lldb::ModuleSP &module_sp,
-                   const lldb::ObjectFileJITDelegateSP &delegate_sp);
-    
-    virtual
-    ~ObjectFileJIT();
+    bool
+    ParseHeader() override;
 
-    virtual bool
-    ParseHeader ();
-
-    virtual bool
+    bool
     SetLoadAddress(lldb_private::Target &target,
                    lldb::addr_t value,
-                   bool value_is_offset);
+                   bool value_is_offset) override;
     
-    virtual lldb::ByteOrder
-    GetByteOrder () const;
+    lldb::ByteOrder
+    GetByteOrder() const override;
     
-    virtual bool
-    IsExecutable () const;
+    bool
+    IsExecutable() const override;
 
-    virtual uint32_t
-    GetAddressByteSize ()  const;
+    uint32_t
+    GetAddressByteSize() const override;
 
-    virtual lldb_private::Symtab *
-    GetSymtab();
+    lldb_private::Symtab *
+    GetSymtab() override;
 
-    virtual bool
-    IsStripped ();
+    bool
+    IsStripped() override;
     
-    virtual void
-    CreateSections (lldb_private::SectionList &unified_section_list);
+    void
+    CreateSections(lldb_private::SectionList &unified_section_list) override;
+
+    void
+    Dump(lldb_private::Stream *s) override;
 
-    virtual void
-    Dump (lldb_private::Stream *s);
+    bool
+    GetArchitecture(lldb_private::ArchSpec &arch) override;
 
-    virtual bool
-    GetArchitecture (lldb_private::ArchSpec &arch);
+    bool
+    GetUUID(lldb_private::UUID* uuid) override;
 
-    virtual bool
-    GetUUID (lldb_private::UUID* uuid);
+    uint32_t
+    GetDependentModules(lldb_private::FileSpecList& files) override;
+    
+    size_t
+    ReadSectionData(const lldb_private::Section *section,
+                    lldb::offset_t section_offset,
+                    void *dst,
+                    size_t dst_len) const override;
 
-    virtual uint32_t
-    GetDependentModules (lldb_private::FileSpecList& files);
+    size_t
+    ReadSectionData(const lldb_private::Section *section,
+                    lldb_private::DataExtractor& section_data) const override;
     
-    virtual size_t
-    ReadSectionData (const lldb_private::Section *section,
-                     lldb::offset_t section_offset,
-                     void *dst,
-                     size_t dst_len) const;
-    virtual size_t
-    ReadSectionData (const lldb_private::Section *section,
-                     lldb_private::DataExtractor& section_data) const;
+    lldb_private::Address
+    GetEntryPointAddress() override;
     
+    lldb_private::Address
+    GetHeaderAddress() override;
+    
+    ObjectFile::Type
+    CalculateType() override;
+    
+    ObjectFile::Strata
+    CalculateStrata() override;
+
     //------------------------------------------------------------------
     // PluginInterface protocol
     //------------------------------------------------------------------
-    virtual lldb_private::ConstString
-    GetPluginName();
+    lldb_private::ConstString
+    GetPluginName() override;
 
-    virtual uint32_t
-    GetPluginVersion();
+    uint32_t
+    GetPluginVersion() override;
 
-    virtual lldb_private::Address
-    GetEntryPointAddress ();
-    
-    virtual lldb_private::Address
-    GetHeaderAddress ();
-    
-    virtual ObjectFile::Type
-    CalculateType();
-    
-    virtual ObjectFile::Strata
-    CalculateStrata();
 protected:
     lldb::ObjectFileJITDelegateWP m_delegate_wp;
 };
 
-#endif  // liblldb_ObjectFileJIT_h_
+#endif // liblldb_ObjectFileJIT_h_

Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=251119&r1=251118&r2=251119&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Fri Oct 23 11:56:07 2015
@@ -7,8 +7,12 @@
 //
 //===----------------------------------------------------------------------===//
 
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
 #include "llvm/ADT/StringRef.h" 
 
+// Project includes
 #include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/DataBuffer.h"
 #include "lldb/Core/Debugger.h"
@@ -67,8 +71,8 @@ public:
         SetRegisterDataFrom_LC_THREAD (data);
     }
 
-    virtual void
-    InvalidateAllRegisters ()
+    void
+    InvalidateAllRegisters() override
     {
         // Do nothing... registers are always valid...
     }
@@ -127,7 +131,6 @@ public:
             }
         }
     }
-    
 
     static size_t
     WriteRegister (RegisterContext *reg_ctx, const char *name, const char *alt_name, size_t reg_byte_size, Stream &data)
@@ -250,44 +253,43 @@ public:
     }
 
 protected:
-    virtual int
-    DoReadGPR (lldb::tid_t tid, int flavor, GPR &gpr)
+    int
+    DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) override
     {
         return 0;
     }
 
-    virtual int
-    DoReadFPU (lldb::tid_t tid, int flavor, FPU &fpu)
+    int
+    DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu) override
     {
         return 0;
     }
 
-    virtual int
-    DoReadEXC (lldb::tid_t tid, int flavor, EXC &exc)
+    int
+    DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc) override
     {
         return 0;
     }
 
-    virtual int
-    DoWriteGPR (lldb::tid_t tid, int flavor, const GPR &gpr)
+    int
+    DoWriteGPR(lldb::tid_t tid, int flavor, const GPR &gpr) override
     {
         return 0;
     }
 
-    virtual int
-    DoWriteFPU (lldb::tid_t tid, int flavor, const FPU &fpu)
+    int
+    DoWriteFPU(lldb::tid_t tid, int flavor, const FPU &fpu) override
     {
         return 0;
     }
 
-    virtual int
-    DoWriteEXC (lldb::tid_t tid, int flavor, const EXC &exc)
+    int
+    DoWriteEXC(lldb::tid_t tid, int flavor, const EXC &exc) override
     {
         return 0;
     }
 };
 
-
 class RegisterContextDarwin_i386_Mach : public RegisterContextDarwin_i386
 {
 public:
@@ -297,8 +299,8 @@ public:
         SetRegisterDataFrom_LC_THREAD (data);
     }
 
-    virtual void
-    InvalidateAllRegisters ()
+    void
+    InvalidateAllRegisters() override
     {
         // Do nothing... registers are always valid...
     }
@@ -425,38 +427,38 @@ public:
     }
 
 protected:
-    virtual int
-    DoReadGPR (lldb::tid_t tid, int flavor, GPR &gpr)
+    int
+    DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) override
     {
         return 0;
     }
 
-    virtual int
-    DoReadFPU (lldb::tid_t tid, int flavor, FPU &fpu)
+    int
+    DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu) override
     {
         return 0;
     }
 
-    virtual int
-    DoReadEXC (lldb::tid_t tid, int flavor, EXC &exc)
+    int
+    DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc) override
     {
         return 0;
     }
 
-    virtual int
-    DoWriteGPR (lldb::tid_t tid, int flavor, const GPR &gpr)
+    int
+    DoWriteGPR(lldb::tid_t tid, int flavor, const GPR &gpr) override
     {
         return 0;
     }
 
-    virtual int
-    DoWriteFPU (lldb::tid_t tid, int flavor, const FPU &fpu)
+    int
+    DoWriteFPU(lldb::tid_t tid, int flavor, const FPU &fpu) override
     {
         return 0;
     }
 
-    virtual int
-    DoWriteEXC (lldb::tid_t tid, int flavor, const EXC &exc)
+    int
+    DoWriteEXC(lldb::tid_t tid, int flavor, const EXC &exc) override
     {
         return 0;
     }
@@ -471,8 +473,8 @@ public:
         SetRegisterDataFrom_LC_THREAD (data);
     }
 
-    virtual void
-    InvalidateAllRegisters ()
+    void
+    InvalidateAllRegisters() override
     {
         // Do nothing... registers are always valid...
     }
@@ -611,50 +613,50 @@ public:
     }
 
 protected:
-    virtual int
-    DoReadGPR (lldb::tid_t tid, int flavor, GPR &gpr)
+    int
+    DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) override
     {
         return -1;
     }
 
-    virtual int
-    DoReadFPU (lldb::tid_t tid, int flavor, FPU &fpu)
+    int
+    DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu) override
     {
         return -1;
     }
 
-    virtual int
-    DoReadEXC (lldb::tid_t tid, int flavor, EXC &exc)
+    int
+    DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc) override
     {
         return -1;
     }
 
-    virtual int
-    DoReadDBG (lldb::tid_t tid, int flavor, DBG &dbg)
+    int
+    DoReadDBG(lldb::tid_t tid, int flavor, DBG &dbg) override
     {
         return -1;
     }
 
-    virtual int
-    DoWriteGPR (lldb::tid_t tid, int flavor, const GPR &gpr)
+    int
+    DoWriteGPR(lldb::tid_t tid, int flavor, const GPR &gpr) override
     {
         return 0;
     }
 
-    virtual int
-    DoWriteFPU (lldb::tid_t tid, int flavor, const FPU &fpu)
+    int
+    DoWriteFPU(lldb::tid_t tid, int flavor, const FPU &fpu) override
     {
         return 0;
     }
 
-    virtual int
-    DoWriteEXC (lldb::tid_t tid, int flavor, const EXC &exc)
+    int
+    DoWriteEXC(lldb::tid_t tid, int flavor, const EXC &exc) override
     {
         return 0;
     }
 
-    virtual int
-    DoWriteDBG (lldb::tid_t tid, int flavor, const DBG &dbg)
+    int
+    DoWriteDBG(lldb::tid_t tid, int flavor, const DBG &dbg) override
     {
         return -1;
     }
@@ -669,8 +671,8 @@ public:
         SetRegisterDataFrom_LC_THREAD (data);
     }
     
-    virtual void
-    InvalidateAllRegisters ()
+    void
+    InvalidateAllRegisters() override
     {
         // Do nothing... registers are always valid...
     }
@@ -819,50 +821,50 @@ public:
     }
 
 protected:
-    virtual int
-    DoReadGPR (lldb::tid_t tid, int flavor, GPR &gpr)
+    int
+    DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) override
     {
         return -1;
     }
     
-    virtual int
-    DoReadFPU (lldb::tid_t tid, int flavor, FPU &fpu)
+    int
+    DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu) override
     {
         return -1;
     }
     
-    virtual int
-    DoReadEXC (lldb::tid_t tid, int flavor, EXC &exc)
+    int
+    DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc) override
     {
         return -1;
     }
 
-    virtual int
-    DoReadDBG (lldb::tid_t tid, int flavor, DBG &dbg)
+    int
+    DoReadDBG(lldb::tid_t tid, int flavor, DBG &dbg) override
     {
         return -1;
     }
     
-    virtual int
-    DoWriteGPR (lldb::tid_t tid, int flavor, const GPR &gpr)
+    int
+    DoWriteGPR(lldb::tid_t tid, int flavor, const GPR &gpr) override
     {
         return 0;
     }
     
-    virtual int
-    DoWriteFPU (lldb::tid_t tid, int flavor, const FPU &fpu)
+    int
+    DoWriteFPU(lldb::tid_t tid, int flavor, const FPU &fpu) override
     {
         return 0;
     }
     
-    virtual int
-    DoWriteEXC (lldb::tid_t tid, int flavor, const EXC &exc)
+    int
+    DoWriteEXC(lldb::tid_t tid, int flavor, const EXC &exc) override
     {
         return 0;
     }
     
-    virtual int
-    DoWriteDBG (lldb::tid_t tid, int flavor, const DBG &dbg)
+    int
+    DoWriteDBG(lldb::tid_t tid, int flavor, const DBG &dbg) override
     {
         return -1;
     }
@@ -907,7 +909,6 @@ ObjectFileMachO::Terminate()
     PluginManager::UnregisterPlugin (CreateInstance);
 }
 
-
 lldb_private::ConstString
 ObjectFileMachO::GetPluginNameStatic()
 {
@@ -1010,8 +1011,6 @@ ObjectFileMachO::GetModuleSpecifications
     return specs.GetSize() - initial_count;
 }
 
-
-
 const ConstString &
 ObjectFileMachO::GetSegmentNameTEXT()
 {
@@ -1073,7 +1072,6 @@ ObjectFileMachO::MagicBytesMatch (DataBu
     return MachHeaderSizeFromMagic(magic) != 0;
 }
 
-
 ObjectFileMachO::ObjectFileMachO(const lldb::ModuleSP &module_sp,
                                  DataBufferSP& data_sp,
                                  lldb::offset_t data_offset,
@@ -1106,10 +1104,6 @@ ObjectFileMachO::ObjectFileMachO (const
     ::memset (&m_dysymtab, 0, sizeof(m_dysymtab));
 }
 
-ObjectFileMachO::~ObjectFileMachO()
-{
-}
-
 bool
 ObjectFileMachO::ParseHeader (DataExtractor &data,
                               lldb::offset_t *data_offset_ptr,
@@ -1255,7 +1249,6 @@ ObjectFileMachO::ParseHeader ()
     return false;
 }
 
-
 ByteOrder
 ObjectFileMachO::GetByteOrder () const
 {
@@ -1945,7 +1938,6 @@ ObjectFileMachO::CreateSections (Section
 class MachSymtabSectionInfo
 {
 public:
-
     MachSymtabSectionInfo (SectionList *section_list) :
         m_section_list (section_list),
         m_section_infos()
@@ -1956,7 +1948,6 @@ public:
         m_section_infos.resize(section_list->GetNumSections(1));
     }
 
-
     SectionSP
     GetSection (uint8_t n_sect, addr_t file_addr)
     {
@@ -2440,7 +2431,6 @@ ObjectFileMachO::ParseSymtab ()
             return 0;
         }
 
-
         const bool have_strtab_data = strtab_data.GetByteSize() > 0;
         if (!have_strtab_data)
         {
@@ -2636,6 +2626,7 @@ ObjectFileMachO::ParseSymtab ()
                 uint64_t    localSymbolsOffset;   // file offset of where local symbols are stored
                 uint64_t    localSymbolsSize;     // size of local symbols information
             };
+
             struct lldb_copy_dyld_cache_header_v1
             {
                 char        magic[16];            // e.g. "dyld_v0    i386", "dyld_v1   armv7", etc.
@@ -2671,6 +2662,7 @@ ObjectFileMachO::ParseSymtab ()
                 uint32_t        entriesOffset;
                 uint32_t        entriesCount;
             };
+
             struct lldb_copy_dyld_cache_local_symbols_entry
             {
                 uint32_t        dylibOffset;
@@ -2966,7 +2958,6 @@ ObjectFileMachO::ParseSymtab ()
                                                         add_nlist = false;
                                                         break;
 
-
                                                     case N_OPT:
                                                         // emitted with gcc2_compiled and in gcc source
                                                         type = eSymbolTypeCompiler;
@@ -3922,7 +3913,6 @@ ObjectFileMachO::ParseSymtab ()
                                 N_SO_index = sym_idx;
                             }
                         }
-
                         break;
 
                     case N_OSO:
@@ -4460,7 +4450,6 @@ ObjectFileMachO::ParseSymtab ()
                         sym[pos.first].SetReExportedSymbolSharedLibrary(dylib_files.GetFileSpecAtIndex(dylib_ordinal-1));
                 }
             }
-
         }
 
         uint32_t synthetic_sym_id = symtab_load_command.nsyms;
@@ -4646,7 +4635,6 @@ ObjectFileMachO::ParseSymtab ()
             }
         }
 
-        
         if (!trie_entries.empty())
         {
             for (const auto &e : trie_entries)
@@ -4674,9 +4662,7 @@ ObjectFileMachO::ParseSymtab ()
                 }
             }
         }
-
-
-        
+       
 //        StreamFile s(stdout, false);
 //        s.Printf ("Symbol table before CalculateSymbolSizes():\n");
 //        symtab->Dump(&s, NULL, eSortOrderNone);
@@ -4691,7 +4677,6 @@ ObjectFileMachO::ParseSymtab ()
     return 0;
 }
 
-
 void
 ObjectFileMachO::Dump (Stream *s)
 {
@@ -4764,7 +4749,6 @@ ObjectFileMachO::GetUUID (const llvm::Ma
     return false;
 }
 
-
 bool
 ObjectFileMachO::GetArchitecture (const llvm::MachO::mach_header &header,
                                   const lldb_private::DataExtractor &data,
@@ -4836,7 +4820,6 @@ ObjectFileMachO::GetUUID (lldb_private::
     return false;
 }
 
-
 uint32_t
 ObjectFileMachO::GetDependentModules (FileSpecList& files)
 {
@@ -5096,7 +5079,6 @@ ObjectFileMachO::GetEntryPointAddress ()
     }
 
     return m_entry_point_address;
-
 }
 
 lldb_private::Address
@@ -5191,7 +5173,6 @@ ObjectFileMachO::GetThreadContextAtIndex
     return reg_ctx_sp;
 }
 
-
 ObjectFile::Type
 ObjectFileMachO::CalculateType()
 {
@@ -5287,7 +5268,6 @@ ObjectFileMachO::CalculateStrata()
     return eStrataUnknown;
 }
 
-
 uint32_t
 ObjectFileMachO::GetVersion (uint32_t *versions, uint32_t num_versions)
 {
@@ -5355,7 +5335,6 @@ ObjectFileMachO::GetArchitecture (ArchSp
     return false;
 }
 
-
 UUID
 ObjectFileMachO::GetProcessSharedCacheUUID (Process *process)
 {
@@ -5550,7 +5529,6 @@ ObjectFileMachO::GetSDKVersion(uint32_t
     return ObjectFile::GetSDKVersion (versions, num_versions);
 }
 
-
 bool
 ObjectFileMachO::GetIsDynamicLinkEditor()
 {
@@ -5572,7 +5550,6 @@ ObjectFileMachO::GetPluginVersion()
     return 1;
 }
 
-
 Section *
 ObjectFileMachO::GetMachHeaderSection()
 {
@@ -6036,4 +6013,3 @@ ObjectFileMachO::SaveCore (const lldb::P
     }
     return false;
 }
-

Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h?rev=251119&r1=251118&r2=251119&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h Fri Oct 23 11:56:07 2015
@@ -10,8 +10,11 @@
 #ifndef liblldb_ObjectFileMachO_h_
 #define liblldb_ObjectFileMachO_h_
 
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
 #include "lldb/Utility/SafeMachO.h"
-
 #include "lldb/Core/Address.h"
 #include "lldb/Core/FileSpecList.h"
 #include "lldb/Core/RangeMap.h"
@@ -27,6 +30,20 @@ class ObjectFileMachO :
     public lldb_private::ObjectFile
 {
 public:
+    ObjectFileMachO(const lldb::ModuleSP &module_sp,
+                    lldb::DataBufferSP& data_sp,
+                    lldb::offset_t data_offset,
+                    const lldb_private::FileSpec* file,
+                    lldb::offset_t offset,
+                    lldb::offset_t length);
+
+    ObjectFileMachO(const lldb::ModuleSP &module_sp,
+                    lldb::DataBufferSP& data_sp,
+                    const lldb::ProcessSP &process_sp,
+                    lldb::addr_t header_addr);
+
+    ~ObjectFileMachO() override = default;
+
     //------------------------------------------------------------------
     // Static Functions
     //------------------------------------------------------------------
@@ -77,113 +94,98 @@ public:
     //------------------------------------------------------------------
     // Member Functions
     //------------------------------------------------------------------
-    ObjectFileMachO (const lldb::ModuleSP &module_sp,
-                     lldb::DataBufferSP& data_sp,
-                     lldb::offset_t data_offset,
-                     const lldb_private::FileSpec* file,
-                     lldb::offset_t offset,
-                     lldb::offset_t length);
-
-    ObjectFileMachO (const lldb::ModuleSP &module_sp,
-                     lldb::DataBufferSP& data_sp,
-                     const lldb::ProcessSP &process_sp,
-                     lldb::addr_t header_addr);
-
-    virtual
-    ~ObjectFileMachO();
+    bool
+    ParseHeader() override;
 
-    virtual bool
-    ParseHeader ();
-
-    virtual bool
+    bool
     SetLoadAddress(lldb_private::Target &target,
                    lldb::addr_t value,
-                   bool value_is_offset);
+                   bool value_is_offset) override;
     
-    virtual lldb::ByteOrder
-    GetByteOrder () const;
+    lldb::ByteOrder
+    GetByteOrder() const override;
     
-    virtual bool
-    IsExecutable () const;
+    bool
+    IsExecutable() const override;
 
-    virtual uint32_t
-    GetAddressByteSize ()  const;
+    uint32_t
+    GetAddressByteSize() const override;
 
-    virtual lldb::AddressClass
-    GetAddressClass (lldb::addr_t file_addr);
+    lldb::AddressClass
+    GetAddressClass(lldb::addr_t file_addr) override;
 
-    virtual lldb_private::Symtab *
-    GetSymtab();
+    lldb_private::Symtab *
+    GetSymtab() override;
 
-    virtual bool
-    IsStripped ();
+    bool
+    IsStripped() override;
     
-    virtual void
-    CreateSections (lldb_private::SectionList &unified_section_list);
+    void
+    CreateSections(lldb_private::SectionList &unified_section_list) override;
 
-    virtual void
-    Dump (lldb_private::Stream *s);
+    void
+    Dump(lldb_private::Stream *s) override;
 
-    virtual bool
-    GetArchitecture (lldb_private::ArchSpec &arch);
+    bool
+    GetArchitecture(lldb_private::ArchSpec &arch) override;
 
-    virtual bool
-    GetUUID (lldb_private::UUID* uuid);
+    bool
+    GetUUID(lldb_private::UUID* uuid) override;
 
-    virtual uint32_t
-    GetDependentModules (lldb_private::FileSpecList& files);
+    uint32_t
+    GetDependentModules(lldb_private::FileSpecList& files) override;
 
-    virtual lldb_private::FileSpecList
-    GetReExportedLibraries ()
+    lldb_private::FileSpecList
+    GetReExportedLibraries() override
     {
         return m_reexported_dylibs;
     }
-    //------------------------------------------------------------------
-    // PluginInterface protocol
-    //------------------------------------------------------------------
-    virtual lldb_private::ConstString
-    GetPluginName();
-
-    virtual uint32_t
-    GetPluginVersion();
 
-    virtual lldb_private::Address
-    GetEntryPointAddress ();
+    lldb_private::Address
+    GetEntryPointAddress() override;
     
-    virtual lldb_private::Address
-    GetHeaderAddress ();
+    lldb_private::Address
+    GetHeaderAddress() override;
     
-    virtual uint32_t
-    GetNumThreadContexts ();
+    uint32_t
+    GetNumThreadContexts() override;
     
-    virtual lldb::RegisterContextSP
-    GetThreadContextAtIndex (uint32_t idx, lldb_private::Thread &thread);
+    lldb::RegisterContextSP
+    GetThreadContextAtIndex(uint32_t idx, lldb_private::Thread &thread) override;
 
-    virtual ObjectFile::Type
-    CalculateType();
+    ObjectFile::Type
+    CalculateType() override;
     
-    virtual ObjectFile::Strata
-    CalculateStrata();
+    ObjectFile::Strata
+    CalculateStrata() override;
 
-    virtual uint32_t
-    GetVersion (uint32_t *versions, uint32_t num_versions);
+    uint32_t
+    GetVersion(uint32_t *versions, uint32_t num_versions) override;
 
-    virtual uint32_t
-    GetMinimumOSVersion (uint32_t *versions, uint32_t num_versions);
+    uint32_t
+    GetMinimumOSVersion(uint32_t *versions, uint32_t num_versions) override;
     
-    virtual uint32_t
-    GetSDKVersion (uint32_t *versions, uint32_t num_versions);
+    uint32_t
+    GetSDKVersion(uint32_t *versions, uint32_t num_versions) override;
 
-    virtual bool
-    GetIsDynamicLinkEditor();
+    bool
+    GetIsDynamicLinkEditor() override;
 
     static bool
     ParseHeader (lldb_private::DataExtractor &data,
                  lldb::offset_t *data_offset_ptr,
                  llvm::MachO::mach_header &header);
     
+    //------------------------------------------------------------------
+    // PluginInterface protocol
+    //------------------------------------------------------------------
+    lldb_private::ConstString
+    GetPluginName() override;
+
+    uint32_t
+    GetPluginVersion() override;
+
 protected:
-    
     static bool
     GetUUID (const llvm::MachO::mach_header &header,
              const lldb_private::DataExtractor &data,
@@ -220,6 +222,9 @@ protected:
                                               const lldb_private::Section *mach_header_section,
                                               const lldb_private::Section *section);
 
+    size_t
+    ParseSymtab();
+
     llvm::MachO::mach_header m_header;
     static const lldb_private::ConstString &GetSegmentNameTEXT();
     static const lldb_private::ConstString &GetSegmentNameDATA();
@@ -239,10 +244,6 @@ protected:
     FileRangeArray m_thread_context_offsets;
     bool m_thread_context_offsets_valid;
     lldb_private::FileSpecList m_reexported_dylibs;
-
-    size_t
-    ParseSymtab ();
-
 };
 
-#endif  // liblldb_ObjectFileMachO_h_
+#endif // liblldb_ObjectFileMachO_h_

Modified: lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h?rev=251119&r1=251118&r2=251119&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h (original)
+++ lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h Fri Oct 23 11:56:07 2015
@@ -10,8 +10,12 @@
 #ifndef liblldb_ObjectFilePECOFF_h_
 #define liblldb_ObjectFilePECOFF_h_
 
+// C Includes
+// C++ Includes
 #include <vector>
 
+// Other libraries and framework includes
+// Project includes
 #include "lldb/Symbol/ObjectFile.h"
 
 class ObjectFilePECOFF : 
@@ -44,6 +48,15 @@ public:
         MachineWcemIpsv2 = 0x169
     } MachineType;
     
+    ObjectFilePECOFF(const lldb::ModuleSP &module_sp,
+                     lldb::DataBufferSP& data_sp,
+                     lldb::offset_t data_offset,
+                     const lldb_private::FileSpec* file,
+                     lldb::offset_t file_offset,
+                     lldb::offset_t length);
+
+    ~ObjectFilePECOFF() override;
+
     //------------------------------------------------------------------
     // Static Functions
     //------------------------------------------------------------------
@@ -84,74 +97,63 @@ public:
     static bool
     MagicBytesMatch (lldb::DataBufferSP& data_sp);
     
+    bool
+    ParseHeader() override;
     
-    ObjectFilePECOFF (const lldb::ModuleSP &module_sp,
-                      lldb::DataBufferSP& data_sp,
-                      lldb::offset_t data_offset,
-                      const lldb_private::FileSpec* file,
-                      lldb::offset_t file_offset,
-                      lldb::offset_t length);
-    
-	virtual 
-    ~ObjectFilePECOFF();
-    
-    virtual bool
-    ParseHeader ();
-    
-    virtual bool
-    SetLoadAddress(lldb_private::Target &target, lldb::addr_t value, bool value_is_offset);
+    bool
+    SetLoadAddress(lldb_private::Target &target, lldb::addr_t value, bool value_is_offset) override;
 
-    virtual lldb::ByteOrder
-    GetByteOrder () const;
+    lldb::ByteOrder
+    GetByteOrder() const override;
     
-    virtual bool
-    IsExecutable () const;
+    bool
+    IsExecutable() const override;
     
-    virtual uint32_t
-    GetAddressByteSize ()  const;
+    uint32_t
+    GetAddressByteSize() const override;
     
 //    virtual lldb_private::AddressClass
 //    GetAddressClass (lldb::addr_t file_addr);
-//    
-    virtual lldb_private::Symtab *
-    GetSymtab ();
-    
-    virtual bool
-    IsStripped ();
 
-    virtual void
-    CreateSections (lldb_private::SectionList &unified_section_list);
+    lldb_private::Symtab *
+    GetSymtab() override;
     
-    virtual void
-    Dump (lldb_private::Stream *s);
+    bool
+    IsStripped() override;
+
+    void
+    CreateSections(lldb_private::SectionList &unified_section_list) override;
     
-    virtual bool
-    GetArchitecture (lldb_private::ArchSpec &arch);
+    void
+    Dump(lldb_private::Stream *s) override;
     
-    virtual bool
-    GetUUID (lldb_private::UUID* uuid);
+    bool
+    GetArchitecture(lldb_private::ArchSpec &arch) override;
     
-    virtual uint32_t
-    GetDependentModules (lldb_private::FileSpecList& files);
+    bool
+    GetUUID(lldb_private::UUID* uuid) override;
     
-    //------------------------------------------------------------------
-    // PluginInterface protocol
-    //------------------------------------------------------------------
-    virtual lldb_private::ConstString
-    GetPluginName();
+    uint32_t
+    GetDependentModules(lldb_private::FileSpecList& files) override;
     
-    virtual uint32_t
-    GetPluginVersion();
-//    
 //    virtual lldb_private::Address
 //    GetEntryPointAddress ();
     
-    virtual ObjectFile::Type
-    CalculateType();
+    ObjectFile::Type
+    CalculateType() override;
+    
+    ObjectFile::Strata
+    CalculateStrata() override;
     
-    virtual ObjectFile::Strata
-    CalculateStrata();
+    //------------------------------------------------------------------
+    // PluginInterface protocol
+    //------------------------------------------------------------------
+    lldb_private::ConstString
+    GetPluginName() override;
     
+    uint32_t
+    GetPluginVersion() override;
+
 protected:
 	bool NeedsEndianSwap() const;    
     
@@ -293,4 +295,4 @@ private:
     lldb::addr_t		m_image_base;
 };
 
-#endif  // #ifndef liblldb_ObjectFilePECOFF_h_
+#endif // liblldb_ObjectFilePECOFF_h_




More information about the lldb-commits mailing list