Skip to content

Commit

Permalink
Merge pull request ethereum#13587 from ethereum/forward-declare-enum
Browse files Browse the repository at this point in the history
[Trivial] Forward declare Instruction enum in EVMVersion
  • Loading branch information
chriseth authored Oct 20, 2022
2 parents 4679ae0 + 9e674ba commit 673b481
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions liblangutil/EVMVersion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*/

#include <liblangutil/EVMVersion.h>
#include <libevmasm/Instruction.h>

using namespace solidity;
using namespace solidity::evmasm;
Expand Down
8 changes: 6 additions & 2 deletions liblangutil/EVMVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,18 @@

#pragma once

#include <libevmasm/Instruction.h>

#include <optional>
#include <string>

#include <boost/operators.hpp>


namespace solidity::evmasm
{
/// Virtual machine bytecode instruction. Forward declared from libevmasm/Instruction.h
enum class Instruction: uint8_t;
}

namespace solidity::langutil
{

Expand Down
2 changes: 2 additions & 0 deletions libyul/AsmAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
#include <libsolutil/StringUtils.h>
#include <libsolutil/Visitor.h>

#include <libevmasm/Instruction.h>

#include <boost/algorithm/string.hpp>

#include <fmt/format.h>
Expand Down
2 changes: 2 additions & 0 deletions libyul/backends/evm/EVMCodeTransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

#include <liblangutil/Exceptions.h>

#include <libevmasm/Instruction.h>

#include <range/v3/view/reverse.hpp>

#include <range/v3/algorithm/max.hpp>
Expand Down
2 changes: 2 additions & 0 deletions libyul/backends/evm/OptimizedEVMCodeTransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include <libyul/Utilities.h>

#include <libevmasm/Instruction.h>

#include <libsolutil/Visitor.h>
#include <libsolutil/cxx20.h>

Expand Down
2 changes: 2 additions & 0 deletions libyul/optimiser/ReasoningBasedSimplifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

#include <libsolutil/CommonData.h>

#include <libevmasm/Instruction.h>

#include <utility>
#include <memory>

Expand Down

0 comments on commit 673b481

Please sign in to comment.