aboutsummaryrefslogtreecommitdiffstats
path: root/libyul/optimiser/NameDispenser.h
diff options
context:
space:
mode:
Diffstat (limited to 'libyul/optimiser/NameDispenser.h')
-rw-r--r--libyul/optimiser/NameDispenser.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/libyul/optimiser/NameDispenser.h b/libyul/optimiser/NameDispenser.h
index 664a5265..719743e6 100644
--- a/libyul/optimiser/NameDispenser.h
+++ b/libyul/optimiser/NameDispenser.h
@@ -27,6 +27,7 @@
namespace yul
{
+struct Dialect;
/**
* Optimizer component that can be used to generate new names that
@@ -38,9 +39,9 @@ class NameDispenser
{
public:
/// Initialize the name dispenser with all the names used in the given AST.
- explicit NameDispenser(Block const& _ast);
+ explicit NameDispenser(Dialect const& _dialect, Block const& _ast);
/// Initialize the name dispenser with the given used names.
- explicit NameDispenser(std::set<YulString> _usedNames);
+ explicit NameDispenser(Dialect const& _dialect, std::set<YulString> _usedNames);
/// @returns a currently unused name that should be similar to _nameHint
/// and prefixed by _context if present.
@@ -51,6 +52,7 @@ public:
private:
YulString newNameInternal(YulString _nameHint);
+ Dialect const& m_dialect;
std::set<YulString> m_usedNames;
size_t m_counter = 0;
};