@@ -52,7 +52,7 @@ class LibcxxStdUnorderedMapSyntheticFrontEnd
5252 ValueObject *m_tree = nullptr ;
5353 size_t m_num_elements = 0 ;
5454 ValueObject *m_next_element = nullptr ;
55- std::vector<std::pair< ValueObject *, uint64_t > > m_elements_cache;
55+ std::vector<ValueObject *> m_elements_cache;
5656};
5757
5858class LibCxxUnorderedMapIteratorSyntheticFrontEnd
@@ -192,26 +192,25 @@ lldb::ValueObjectSP lldb_private::formatters::
192192 return nullptr ;
193193 }
194194 }
195- m_elements_cache.push_back (
196- {value_sp.get (), hash_sp->GetValueAsUnsigned (0 )});
195+ m_elements_cache.push_back (value_sp.get ());
197196 m_next_element = node_sp->GetChildMemberWithName (" __next_" ).get ();
198197 if (!m_next_element || m_next_element->GetValueAsUnsigned (0 ) == 0 )
199198 m_next_element = nullptr ;
200199 }
201200
202- std::pair< ValueObject *, uint64_t > val_hash = m_elements_cache[idx];
203- if (!val_hash. first )
201+ ValueObject *val_hash = m_elements_cache[idx];
202+ if (!val_hash)
204203 return lldb::ValueObjectSP ();
205204 StreamString stream;
206205 stream.Printf (" [%" PRIu64 " ]" , (uint64_t )idx);
207206 DataExtractor data;
208207 Status error;
209- val_hash. first ->GetData (data, error);
208+ val_hash->GetData (data, error);
210209 if (error.Fail ())
211210 return lldb::ValueObjectSP ();
212211 const bool thread_and_frame_only_if_stopped = true ;
213- ExecutionContext exe_ctx = val_hash. first -> GetExecutionContextRef (). Lock (
214- thread_and_frame_only_if_stopped);
212+ ExecutionContext exe_ctx =
213+ val_hash-> GetExecutionContextRef (). Lock ( thread_and_frame_only_if_stopped);
215214 return CreateValueObjectFromData (stream.GetString (), data, exe_ctx,
216215 m_element_type);
217216}
0 commit comments