[Lldb-commits] [lldb] [lldb] Avoid repeated map lookups (NFC) (PR #112655)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 16 20:40:41 PDT 2024
================
@@ -5324,7 +5324,7 @@ std::string ProcessGDBRemote::HarmonizeThreadIdsForProfileData(
std::map<uint64_t, uint32_t>::iterator iterator =
m_thread_id_to_used_usec_map.find(thread_id);
if (iterator != m_thread_id_to_used_usec_map.end()) {
- prev_used_usec = m_thread_id_to_used_usec_map[thread_id];
+ prev_used_usec = iterator->second;
}
----------------
JDevlieghere wrote:
While you're here, might as well remove the braces around the single-line `if`.
https://github.com/llvm/llvm-project/pull/112655
More information about the lldb-commits
mailing list