diff options
Diffstat (limited to 'libyul/optimiser/NameCollector.h')
-rw-r--r-- | libyul/optimiser/NameCollector.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/libyul/optimiser/NameCollector.h b/libyul/optimiser/NameCollector.h index b8f6c1d7..b76eec30 100644 --- a/libyul/optimiser/NameCollector.h +++ b/libyul/optimiser/NameCollector.h @@ -22,7 +22,6 @@ #include <libyul/optimiser/ASTWalker.h> -#include <string> #include <map> #include <set> @@ -46,9 +45,9 @@ public: virtual void operator()(VariableDeclaration const& _varDecl) override; virtual void operator()(FunctionDefinition const& _funDef) override; - std::set<std::string> names() const { return m_names; } + std::set<YulString> names() const { return m_names; } private: - std::set<std::string> m_names; + std::set<YulString> m_names; }; /** @@ -61,12 +60,12 @@ public: virtual void operator()(Identifier const& _identifier); virtual void operator()(FunctionCall const& _funCall); - static std::map<std::string, size_t> countReferences(Block const& _block); - static std::map<std::string, size_t> countReferences(Expression const& _expression); + static std::map<YulString, size_t> countReferences(Block const& _block); + static std::map<YulString, size_t> countReferences(Expression const& _expression); - std::map<std::string, size_t> const& references() const { return m_references; } + std::map<YulString, size_t> const& references() const { return m_references; } private: - std::map<std::string, size_t> m_references; + std::map<YulString, size_t> m_references; }; /** @@ -78,9 +77,9 @@ public: using ASTWalker::operator (); virtual void operator()(Assignment const& _assignment) override; - std::set<std::string> const& names() const { return m_names; } + std::set<YulString> const& names() const { return m_names; } private: - std::set<std::string> m_names; + std::set<YulString> m_names; }; } |