Skip to content

Commit

Permalink
Revert "unique_ptrify LoadedObjectInfo::clone"
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tobiasgrosser committed May 22, 2015
1 parent fe0d65b commit 82967c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 5 additions & 2 deletions include/llvm/DebugInfo/DIContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "llvm/Support/Casting.h"
#include "llvm/Support/DataTypes.h"
#include <string>
#include <memory>

namespace llvm {

Expand Down Expand Up @@ -166,7 +165,11 @@ class LoadedObjectInfo {
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;
};

}
Expand Down
5 changes: 2 additions & 3 deletions include/llvm/ExecutionEngine/RuntimeDyld.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -81,8 +80,8 @@ class RuntimeDyld {
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));
}
};

Expand Down

0 comments on commit 82967c0

Please sign in to comment.