mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-30 08:24:12 +00:00
Re-unique_ptrify LoadedObjectInfo::clone after it was reverted due to some other changes that broke on GCC around the same time
Apparently this functionality isn't used in-tree (or I would go & make the explicit unique_ptr constructions into implicit constructions to make them more self documenting now that clone doesn't return a raw owning pointer anymore) but only by the Julia frontend. This isn't ideal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239091 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2cdee49937
commit
a520577e7e
@ -169,7 +169,7 @@ public:
|
||||
/// Obtain a copy of this LoadedObjectInfo.
|
||||
///
|
||||
/// The caller is responsible for deallocation once the copy is no longer required.
|
||||
virtual LoadedObjectInfo *clone() const = 0;
|
||||
virtual std::unique_ptr<LoadedObjectInfo> clone() const = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -15,6 +15,7 @@
|
||||
#define LLVM_EXECUTIONENGINE_RUNTIMEDYLD_H
|
||||
|
||||
#include "JITSymbolFlags.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/Support/Memory.h"
|
||||
#include "llvm/DebugInfo/DIContext.h"
|
||||
@ -78,8 +79,8 @@ public:
|
||||
LoadedObjectInfoHelper(RuntimeDyldImpl &RTDyld, unsigned BeginIdx,
|
||||
unsigned EndIdx)
|
||||
: LoadedObjectInfo(RTDyld, BeginIdx, EndIdx) {}
|
||||
llvm::LoadedObjectInfo *clone() const override {
|
||||
return new Derived(static_cast<const Derived &>(*this));
|
||||
std::unique_ptr<llvm::LoadedObjectInfo> clone() const override {
|
||||
return llvm::make_unique<Derived>(static_cast<const Derived &>(*this));
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user