mirror of
https://github.com/RPCSX/llvm.git
synced 2025-04-02 08:11:54 +00:00
Fix -Wdeprecated regarding ORC copying ValueMaterializers
As usual, this is a polymorphic hierarchy without polymorphic ownership, so simply make the dtor protected non-virtual, protected default copy ctor/assign, and make derived classes final. The derived classes will pick up correct default public copy ops (and dtor) implicitly. (wish I could add -Wdeprecated to the build, but last time I tried it triggered on some system headers I still need to look into/figure out) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250747 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2949a6ae04
commit
36d045a51f
@ -44,7 +44,7 @@ class CompileOnDemandLayer {
|
||||
private:
|
||||
|
||||
template <typename MaterializerFtor>
|
||||
class LambdaMaterializer : public ValueMaterializer {
|
||||
class LambdaMaterializer final : public ValueMaterializer {
|
||||
public:
|
||||
LambdaMaterializer(MaterializerFtor M) : M(std::move(M)) {}
|
||||
Value* materializeValueFor(Value *V) final {
|
||||
|
@ -38,9 +38,14 @@ namespace llvm {
|
||||
/// to materialize Values on demand.
|
||||
class ValueMaterializer {
|
||||
virtual void anchor(); // Out of line method.
|
||||
public:
|
||||
virtual ~ValueMaterializer() {}
|
||||
|
||||
protected:
|
||||
~ValueMaterializer() = default;
|
||||
ValueMaterializer() = default;
|
||||
ValueMaterializer(const ValueMaterializer&) = default;
|
||||
ValueMaterializer &operator=(const ValueMaterializer&) = default;
|
||||
|
||||
public:
|
||||
/// materializeValueFor - The client should implement this method if they
|
||||
/// want to generate a mapped Value on demand. For example, if linking
|
||||
/// lazily.
|
||||
|
@ -365,7 +365,7 @@ class ModuleLinker;
|
||||
/// Creates prototypes for functions that are lazily linked on the fly. This
|
||||
/// speeds up linking for modules with many/ lazily linked functions of which
|
||||
/// few get used.
|
||||
class ValueMaterializerTy : public ValueMaterializer {
|
||||
class ValueMaterializerTy final : public ValueMaterializer {
|
||||
TypeMapTy &TypeMap;
|
||||
Module *DstM;
|
||||
std::vector<GlobalValue *> &LazilyLinkGlobalValues;
|
||||
|
Loading…
x
Reference in New Issue
Block a user