mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-12-22 02:21:37 +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:
@@ -169,7 +169,7 @@ public:
|
|||||||
/// Obtain a copy of this LoadedObjectInfo.
|
/// Obtain a copy of this LoadedObjectInfo.
|
||||||
///
|
///
|
||||||
/// The caller is responsible for deallocation once the copy is no longer required.
|
/// 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
|
#define LLVM_EXECUTIONENGINE_RUNTIMEDYLD_H
|
||||||
|
|
||||||
#include "JITSymbolFlags.h"
|
#include "JITSymbolFlags.h"
|
||||||
|
#include "llvm/ADT/STLExtras.h"
|
||||||
#include "llvm/ADT/StringRef.h"
|
#include "llvm/ADT/StringRef.h"
|
||||||
#include "llvm/Support/Memory.h"
|
#include "llvm/Support/Memory.h"
|
||||||
#include "llvm/DebugInfo/DIContext.h"
|
#include "llvm/DebugInfo/DIContext.h"
|
||||||
@@ -78,8 +79,8 @@ public:
|
|||||||
LoadedObjectInfoHelper(RuntimeDyldImpl &RTDyld, unsigned BeginIdx,
|
LoadedObjectInfoHelper(RuntimeDyldImpl &RTDyld, unsigned BeginIdx,
|
||||||
unsigned EndIdx)
|
unsigned EndIdx)
|
||||||
: LoadedObjectInfo(RTDyld, BeginIdx, EndIdx) {}
|
: LoadedObjectInfo(RTDyld, BeginIdx, EndIdx) {}
|
||||||
llvm::LoadedObjectInfo *clone() const override {
|
std::unique_ptr<llvm::LoadedObjectInfo> clone() const override {
|
||||||
return new Derived(static_cast<const Derived &>(*this));
|
return llvm::make_unique<Derived>(static_cast<const Derived &>(*this));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user