Revert "Fix Clang -Wmissing-override warning"
authorTobias Grosser <tobias@grosser.es>
Fri, 22 May 2015 06:01:04 +0000 (06:01 +0000)
committerTobias Grosser <tobias@grosser.es>
Fri, 22 May 2015 06:01:04 +0000 (06:01 +0000)
This reverts commit r237975. This seems also to break with gcc 4.7

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

include/llvm/ExecutionEngine/RuntimeDyld.h
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp

index ac0151aa7ec1ee506312df304616bf0545958685..7b3bd939b90d8c246e889669d2f19b6615cb967e 100644 (file)
@@ -62,7 +62,7 @@ public:
                      unsigned EndIdx)
       : RTDyld(RTDyld), BeginIdx(BeginIdx), EndIdx(EndIdx) { }
 
-    virtual ~LoadedObjectInfo() = default;
+    virtual ~LoadedObjectInfo() {}
 
     virtual object::OwningBinary<object::ObjectFile>
     getObjectForDebug(const object::ObjectFile &Obj) const = 0;
@@ -76,15 +76,6 @@ public:
     unsigned BeginIdx, EndIdx;
   };
 
-  template <typename Derived> struct LoadedObjectInfoHelper : LoadedObjectInfo {
-    LoadedObjectInfoHelper(RuntimeDyldImpl &RTDyld, unsigned BeginIdx,
-                           unsigned EndIdx)
-        : LoadedObjectInfo(RTDyld, BeginIdx, EndIdx) {}
-    llvm::LoadedObjectInfo *clone() const override {
-      return new Derived(static_cast<const Derived &>(*this));
-    }
-  };
-
   /// \brief Memory Management.
   class MemoryManager {
   public:
index c8d3d22966de74ed13c1280d263e330479ea45b6..0cb1d7bcf1d6b534167d145ef859234786a4995e 100644 (file)
@@ -24,17 +24,18 @@ using namespace llvm::object;
 
 namespace {
 
-class LoadedCOFFObjectInfo
-    : public RuntimeDyld::LoadedObjectInfoHelper<LoadedCOFFObjectInfo> {
+class LoadedCOFFObjectInfo : public RuntimeDyld::LoadedObjectInfo {
 public:
   LoadedCOFFObjectInfo(RuntimeDyldImpl &RTDyld, unsigned BeginIdx,
                        unsigned EndIdx)
-      : LoadedObjectInfoHelper(RTDyld, BeginIdx, EndIdx) {}
+      : RuntimeDyld::LoadedObjectInfo(RTDyld, BeginIdx, EndIdx) {}
 
   OwningBinary<ObjectFile>
   getObjectForDebug(const ObjectFile &Obj) const override {
     return OwningBinary<ObjectFile>();
   }
+
+  RuntimeDyld::LoadedObjectInfo *clone() const { return new LoadedCOFFObjectInfo(*this); }
 };
 }
 
index 95421b35db5cf4c319340384a5a4bea35a0d2101..c22636cc6b3c9c8d80368e5a9c4a67d1c8409f33 100644 (file)
@@ -104,15 +104,16 @@ void DyldELFObject<ELFT>::updateSymbolAddress(const SymbolRef &SymRef,
   sym->st_value = static_cast<addr_type>(Addr);
 }
 
-class LoadedELFObjectInfo
-    : public RuntimeDyld::LoadedObjectInfoHelper<LoadedELFObjectInfo> {
+class LoadedELFObjectInfo : public RuntimeDyld::LoadedObjectInfo {
 public:
   LoadedELFObjectInfo(RuntimeDyldImpl &RTDyld, unsigned BeginIdx,
                       unsigned EndIdx)
-      : LoadedObjectInfoHelper(RTDyld, BeginIdx, EndIdx) {}
+    : RuntimeDyld::LoadedObjectInfo(RTDyld, BeginIdx, EndIdx) {}
 
   OwningBinary<ObjectFile>
   getObjectForDebug(const ObjectFile &Obj) const override;
+
+  RuntimeDyld::LoadedObjectInfo *clone() const { return new LoadedELFObjectInfo(*this); }
 };
 
 template <typename ELFT>
index d4a680d749a163e95a2aa33a727ea6965b0187ab..796a69cc836e03a4782f3545e0d035be9a0e44d3 100644 (file)
@@ -26,17 +26,18 @@ using namespace llvm::object;
 
 namespace {
 
-class LoadedMachOObjectInfo
-    : public RuntimeDyld::LoadedObjectInfoHelper<LoadedMachOObjectInfo> {
+class LoadedMachOObjectInfo : public RuntimeDyld::LoadedObjectInfo {
 public:
   LoadedMachOObjectInfo(RuntimeDyldImpl &RTDyld, unsigned BeginIdx,
                         unsigned EndIdx)
-      : LoadedObjectInfoHelper(RTDyld, BeginIdx, EndIdx) {}
+    : RuntimeDyld::LoadedObjectInfo(RTDyld, BeginIdx, EndIdx) {}
 
   OwningBinary<ObjectFile>
   getObjectForDebug(const ObjectFile &Obj) const override {
     return OwningBinary<ObjectFile>();
   }
+
+  RuntimeDyld::LoadedObjectInfo *clone() const { return new LoadedMachOObjectInfo(*this); }
 };
 
 }