Rationalize what is public in RuntimeDyldMachO and RuntimeDyldELF.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 29 Apr 2013 22:06:33 +0000 (22:06 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 29 Apr 2013 22:06:33 +0000 (22:06 +0000)
The implemented RuntimeDyldImpl interface is public. Everything else is private.
Since these classes are not inherited from (yet), there is no need to have
protected members.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180733 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h

index 2c04198ac01045c61627b91c2c940835142d3964..b6ddf2d6a7aee18a77fece44606fc06cb1da71eb 100644 (file)
@@ -37,7 +37,6 @@ class RuntimeDyldELF : public RuntimeDyldImpl {
                          uint32_t Type,
                          int64_t Addend);
 
-protected:
   void resolveX86_64Relocation(const SectionEntry &Section,
                                uint64_t Offset,
                                uint64_t Value,
@@ -68,18 +67,9 @@ protected:
                               uint32_t Type,
                               int64_t Addend);
 
-  virtual void resolveRelocation(const RelocationEntry &RE, uint64_t Value);
-
-  virtual void processRelocationRef(unsigned SectionID,
-                                    RelocationRef RelI,
-                                    ObjectImage &Obj,
-                                    ObjSectionToIDMap &ObjSectionToID,
-                                    const SymbolTableMap &Symbols,
-                                    StubMap &Stubs);
 
   unsigned getCommonSymbolAlignment(const SymbolRef &Sym);
 
-  virtual ObjectImage *createObjectImage(ObjectBuffer *InputBuffer);
 
   uint64_t findPPC64TOC() const;
   void findOPDEntrySection(ObjectImage &Obj,
@@ -87,12 +77,18 @@ protected:
                            RelocationValueRef &Rel);
 
 public:
-  RuntimeDyldELF(RTDyldMemoryManager *mm)
-      : RuntimeDyldImpl(mm) {}
+  RuntimeDyldELF(RTDyldMemoryManager *mm) : RuntimeDyldImpl(mm) {}
 
+  virtual void resolveRelocation(const RelocationEntry &RE, uint64_t Value);
+  virtual void processRelocationRef(unsigned SectionID,
+                                    RelocationRef RelI,
+                                    ObjectImage &Obj,
+                                    ObjSectionToIDMap &ObjSectionToID,
+                                    const SymbolTableMap &Symbols,
+                                    StubMap &Stubs);
+  virtual bool isCompatibleFormat(const ObjectBuffer *Buffer) const;
+  virtual ObjectImage *createObjectImage(ObjectBuffer *InputBuffer);
   virtual ~RuntimeDyldELF();
-
-  bool isCompatibleFormat(const ObjectBuffer *Buffer) const;
 };
 
 } // end namespace llvm
index 0fbfe038c88ccbf6fc8b10157413cfacd989cb8e..8da6e35a87db2325569cc7b65bbc1cbc53f8cf2e 100644 (file)
@@ -25,7 +25,6 @@ using namespace llvm::object;
 
 namespace llvm {
 class RuntimeDyldMachO : public RuntimeDyldImpl {
-protected:
   bool resolveI386Relocation(uint8_t *LocalAddress,
                              uint64_t FinalAddress,
                              uint64_t Value,
@@ -48,13 +47,6 @@ protected:
                             unsigned Size,
                             int64_t Addend);
 
-  virtual void processRelocationRef(unsigned SectionID,
-                                    RelocationRef RelI,
-                                    ObjectImage &Obj,
-                                    ObjSectionToIDMap &ObjSectionToID,
-                                    const SymbolTableMap &Symbols,
-                                    StubMap &Stubs);
-
   void resolveRelocation(const SectionEntry &Section,
                          uint64_t Offset,
                          uint64_t Value,
@@ -63,11 +55,16 @@ protected:
                          bool isPCRel,
                          unsigned Size);
 public:
-  virtual void resolveRelocation(const RelocationEntry &RE, uint64_t Value);
-
   RuntimeDyldMachO(RTDyldMemoryManager *mm) : RuntimeDyldImpl(mm) {}
 
-  bool isCompatibleFormat(const ObjectBuffer *Buffer) const;
+  virtual void resolveRelocation(const RelocationEntry &RE, uint64_t Value);
+  virtual void processRelocationRef(unsigned SectionID,
+                                    RelocationRef RelI,
+                                    ObjectImage &Obj,
+                                    ObjSectionToIDMap &ObjSectionToID,
+                                    const SymbolTableMap &Symbols,
+                                    StubMap &Stubs);
+  virtual bool isCompatibleFormat(const ObjectBuffer *Buffer) const;
 };
 
 } // end namespace llvm