Skip to content

Commit 9e674ba

Browse files
committed
Forward declare Instruction enum in EVMVersion
1 parent 2ba8fc1 commit 9e674ba

File tree

6 files changed

+15
-2
lines changed

6 files changed

+15
-2
lines changed

liblangutil/EVMVersion.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*/
2121

2222
#include <liblangutil/EVMVersion.h>
23+
#include <libevmasm/Instruction.h>
2324

2425
using namespace solidity;
2526
using namespace solidity::evmasm;

liblangutil/EVMVersion.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,18 @@
2121

2222
#pragma once
2323

24-
#include <libevmasm/Instruction.h>
25-
2624
#include <optional>
2725
#include <string>
2826

2927
#include <boost/operators.hpp>
3028

3129

30+
namespace solidity::evmasm
31+
{
32+
/// Virtual machine bytecode instruction. Forward declared from libevmasm/Instruction.h
33+
enum class Instruction: uint8_t;
34+
}
35+
3236
namespace solidity::langutil
3337
{
3438

libyul/AsmAnalysis.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
#include <libsolutil/StringUtils.h>
3636
#include <libsolutil/Visitor.h>
3737

38+
#include <libevmasm/Instruction.h>
39+
3840
#include <boost/algorithm/string.hpp>
3941

4042
#include <fmt/format.h>

libyul/backends/evm/EVMCodeTransform.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030

3131
#include <liblangutil/Exceptions.h>
3232

33+
#include <libevmasm/Instruction.h>
34+
3335
#include <range/v3/view/reverse.hpp>
3436

3537
#include <range/v3/algorithm/max.hpp>

libyul/backends/evm/OptimizedEVMCodeTransform.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323

2424
#include <libyul/Utilities.h>
2525

26+
#include <libevmasm/Instruction.h>
27+
2628
#include <libsolutil/Visitor.h>
2729
#include <libsolutil/cxx20.h>
2830

libyul/optimiser/ReasoningBasedSimplifier.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828

2929
#include <libsolutil/CommonData.h>
3030

31+
#include <libevmasm/Instruction.h>
32+
3133
#include <utility>
3234
#include <memory>
3335

0 commit comments

Comments
 (0)