mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[yul-phaser] Make Program copyable by doing a deep copy of the AST in the copy constructor
This commit is contained in:
@@ -20,8 +20,6 @@
|
||||
#include <libyul/optimiser/NameDispenser.h>
|
||||
#include <libyul/AsmData.h>
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
|
||||
#include <optional>
|
||||
#include <ostream>
|
||||
#include <set>
|
||||
@@ -55,14 +53,16 @@ namespace solidity::phaser
|
||||
* The class allows the user to apply extra optimisations and obtain metrics and general
|
||||
* information about the resulting syntax tree.
|
||||
*/
|
||||
class Program: private boost::noncopyable
|
||||
class Program
|
||||
{
|
||||
public:
|
||||
Program(Program const& program);
|
||||
Program(Program&& program):
|
||||
m_ast(std::move(program.m_ast)),
|
||||
m_dialect{program.m_dialect},
|
||||
m_nameDispenser(std::move(program.m_nameDispenser))
|
||||
{}
|
||||
Program operator=(Program const& program) = delete;
|
||||
Program operator=(Program&& program) = delete;
|
||||
|
||||
static Program load(langutil::CharStream& _sourceCode);
|
||||
|
||||
Reference in New Issue
Block a user