Revert "unique_ptrify LoadedObjectInfo::clone"
authorTobias Grosser <tobias@grosser.es>
Fri, 22 May 2015 05:33:54 +0000 (05:33 +0000)
committerTobias Grosser <tobias@grosser.es>
Fri, 22 May 2015 05:33:54 +0000 (05:33 +0000)
This reverts commit r237976, which seems to break existing gcc 4.7 buildbots.

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

include/llvm/DebugInfo/DIContext.h
include/llvm/ExecutionEngine/RuntimeDyld.h

index da1b5e985d85cdf5cc8314ec2052557fb6ea3bc6..d8830da56b518cdf352cdf036fae088b9a264792 100644 (file)
@@ -22,7 +22,6 @@
 #include "llvm/Support/Casting.h"
 #include "llvm/Support/DataTypes.h"
 #include <string>
-#include <memory>
 
 namespace llvm {
 
@@ -166,7 +165,11 @@ public:
   virtual bool getLoadedSectionContents(StringRef Name, StringRef &Data) const {
     return false;
   }
-  virtual std::unique_ptr<LoadedObjectInfo> clone() const = 0;
+
+  /// Obtain a copy of this LoadedObjectInfo.
+  ///
+  /// The caller is responsible for deallocation once the copy is no longer required.
+  virtual LoadedObjectInfo *clone() const = 0;
 };
 
 }
index b882f133adba50b427fea62c3a7bc44c167f791b..ac0151aa7ec1ee506312df304616bf0545958685 100644 (file)
@@ -16,7 +16,6 @@
 
 #include "JITSymbolFlags.h"
 #include "llvm/ADT/StringRef.h"
-#include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/Memory.h"
 #include "llvm/DebugInfo/DIContext.h"
 #include <memory>
@@ -81,8 +80,8 @@ public:
     LoadedObjectInfoHelper(RuntimeDyldImpl &RTDyld, unsigned BeginIdx,
                            unsigned EndIdx)
         : LoadedObjectInfo(RTDyld, BeginIdx, EndIdx) {}
-    std::unique_ptr<llvm::LoadedObjectInfo> clone() const override {
-      return llvm::make_unique<Derived>(static_cast<const Derived &>(*this));
+    llvm::LoadedObjectInfo *clone() const override {
+      return new Derived(static_cast<const Derived &>(*this));
     }
   };