File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -143,12 +143,8 @@ class IRGenerationContext
143143
144144 RevertStrings revertStrings () const { return m_revertStrings; }
145145
146- std::vector<ContractDefinition const *> const & subObjectsCreated () const { return m_subObjects; }
147- void addSubObject (ContractDefinition const * _contractDefinition)
148- {
149- if (!util::contains (m_subObjects, _contractDefinition))
150- m_subObjects.emplace_back (_contractDefinition);
151- }
146+ util::UniqueVector<ContractDefinition const *> const & subObjectsCreated () const { return m_subObjects; }
147+ void addSubObject (ContractDefinition const * _contractDefinition) { m_subObjects.pushBack (_contractDefinition); }
152148
153149 bool memoryUnsafeInlineAssemblySeen () const { return m_memoryUnsafeInlineAssemblySeen; }
154150 void setMemoryUnsafeInlineAssemblySeen () { m_memoryUnsafeInlineAssemblySeen = true ; }
@@ -200,7 +196,7 @@ class IRGenerationContext
200196 // / It will fail at runtime but the code must still compile.
201197 InternalDispatchMap m_internalDispatchMap;
202198
203- std::vector <ContractDefinition const *> m_subObjects;
199+ util::UniqueVector <ContractDefinition const *> m_subObjects;
204200
205201 langutil::DebugInfoSelection m_debugInfoSelection = {};
206202 langutil::CharStreamProvider const * m_soliditySourceProvider = nullptr ;
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ std::string IRGenerator::generate(
101101 std::map<ContractDefinition const *, std::string_view const > const & _otherYulSources
102102)
103103{
104- auto subObjectSources = [&_otherYulSources](std::vector <ContractDefinition const *> const & subObjects) -> std::string
104+ auto subObjectSources = [&_otherYulSources](util::UniqueVector <ContractDefinition const *> const & subObjects) -> std::string
105105 {
106106 std::string subObjectsSources;
107107 for (ContractDefinition const * subObject: subObjects)
You can’t perform that action at this time.
0 commit comments