Revert "unique_ptrify LoadedObjectInfo::clone"

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
This commit is contained in:
Tobias Grosser 2015-05-22 05:33:54 +00:00
parent fe0d65bcc6
commit 82967c0bcd
2 changed files with 7 additions and 5 deletions

View 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;
};
}

View 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));
}
};