[llvm] r237996 - Revert "unique_ptrify LoadedObjectInfo::clone"
Tobias Grosser
tobias at grosser.es
Thu May 21 22:33:55 PDT 2015
Author: grosser
Date: Fri May 22 00:33:54 2015
New Revision: 237996
URL: http://llvm.org/viewvc/llvm-project?rev=237996&view=rev
Log:
Revert "unique_ptrify LoadedObjectInfo::clone"
This reverts commit r237976, which seems to break existing gcc 4.7 buildbots.
Modified:
llvm/trunk/include/llvm/DebugInfo/DIContext.h
llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h
Modified: llvm/trunk/include/llvm/DebugInfo/DIContext.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/DIContext.h?rev=237996&r1=237995&r2=237996&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/DIContext.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/DIContext.h Fri May 22 00:33:54 2015
@@ -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;
};
}
Modified: llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h?rev=237996&r1=237995&r2=237996&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h Fri May 22 00:33:54 2015
@@ -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));
}
};
More information about the llvm-commits
mailing list