aboutsummaryrefslogtreecommitdiffstats
path: root/libjulia/optimiser
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-05-02 21:27:16 +0800
committerGitHub <noreply@github.com>2018-05-02 21:27:16 +0800
commitdc18cde66f9dca1cfe93f04a376e9c20a4614328 (patch)
treeb017d487890f286a05e5cfe97215f5e2a3985bb8 /libjulia/optimiser
parent5cce2e552baf1f7431c99500da74cb929360c3b8 (diff)
parentf94b793472a8427e0507862cd5595cc92e70f53c (diff)
downloaddexon-solidity-dc18cde66f9dca1cfe93f04a376e9c20a4614328.tar
dexon-solidity-dc18cde66f9dca1cfe93f04a376e9c20a4614328.tar.gz
dexon-solidity-dc18cde66f9dca1cfe93f04a376e9c20a4614328.tar.bz2
dexon-solidity-dc18cde66f9dca1cfe93f04a376e9c20a4614328.tar.lz
dexon-solidity-dc18cde66f9dca1cfe93f04a376e9c20a4614328.tar.xz
dexon-solidity-dc18cde66f9dca1cfe93f04a376e9c20a4614328.tar.zst
dexon-solidity-dc18cde66f9dca1cfe93f04a376e9c20a4614328.zip
Merge pull request #4040 from aarlt/virtual-destructors
Add virtual destructors on base classes.
Diffstat (limited to 'libjulia/optimiser')
-rw-r--r--libjulia/optimiser/ASTCopier.h3
-rw-r--r--libjulia/optimiser/ASTWalker.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/libjulia/optimiser/ASTCopier.h b/libjulia/optimiser/ASTCopier.h
index 36a1ced5..8681f2e0 100644
--- a/libjulia/optimiser/ASTCopier.h
+++ b/libjulia/optimiser/ASTCopier.h
@@ -37,6 +37,7 @@ namespace julia
class ExpressionCopier: public boost::static_visitor<Expression>
{
public:
+ virtual ~ExpressionCopier() = default;
virtual Expression operator()(Literal const& _literal) = 0;
virtual Expression operator()(Identifier const& _identifier) = 0;
virtual Expression operator()(FunctionalInstruction const& _instr) = 0;
@@ -46,6 +47,7 @@ public:
class StatementCopier: public boost::static_visitor<Statement>
{
public:
+ virtual ~StatementCopier() = default;
virtual Statement operator()(ExpressionStatement const& _statement) = 0;
virtual Statement operator()(Instruction const& _instruction) = 0;
virtual Statement operator()(Label const& _label) = 0;
@@ -66,6 +68,7 @@ public:
class ASTCopier: public ExpressionCopier, public StatementCopier
{
public:
+ virtual ~ASTCopier() = default;
virtual Expression operator()(Literal const& _literal) override;
virtual Statement operator()(Instruction const& _instruction) override;
virtual Expression operator()(Identifier const& _identifier) override;
diff --git a/libjulia/optimiser/ASTWalker.h b/libjulia/optimiser/ASTWalker.h
index 97891381..f09c2ff1 100644
--- a/libjulia/optimiser/ASTWalker.h
+++ b/libjulia/optimiser/ASTWalker.h
@@ -42,6 +42,7 @@ namespace julia
class ASTWalker: public boost::static_visitor<>
{
public:
+ virtual ~ASTWalker() = default;
virtual void operator()(Literal const&) {}
virtual void operator()(Instruction const&) { solAssert(false, ""); }
virtual void operator()(Identifier const&) {}
@@ -82,6 +83,7 @@ protected:
class ASTModifier: public boost::static_visitor<>
{
public:
+ virtual ~ASTModifier() = default;
virtual void operator()(Literal&) {}
virtual void operator()(Instruction&) { solAssert(false, ""); }
virtual void operator()(Identifier&) {}