summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2016-08-01 16:37:37 +0000
committerVedant Kumar <vsk@apple.com>2016-08-01 16:37:37 +0000
commitcbba4b2059ee8c68f0e26a8783722d12b0225e80 (patch)
treeacd62f1720b209c479b0b94861efeef7195b1b87 /lldb/source/Plugins
parent6e0b73200938ba3ab2f5e3e54a62960ad5b7a894 (diff)
downloadbcm5719-llvm-cbba4b2059ee8c68f0e26a8783722d12b0225e80.tar.gz
bcm5719-llvm-cbba4b2059ee8c68f0e26a8783722d12b0225e80.zip
[lldb][tsan] Perform one map lookup instead of two (NFC)
Differential Revision: https://reviews.llvm.org/D22983 llvm-svn: 277350
Diffstat (limited to 'lldb/source/Plugins')
-rw-r--r--lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp b/lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp
index 1d9fab31a0d..a08c26fa483 100644
--- a/lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp
+++ b/lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp
@@ -335,10 +335,11 @@ GetRenumberedThreadIds(ProcessSP process_sp, ValueObjectSP data, std::map<uint64
}
static user_id_t Renumber(uint64_t id, std::map<uint64_t, user_id_t> &thread_id_map) {
- if (! thread_id_map.count(id))
+ auto IT = thread_id_map.find(id);
+ if (IT == thread_id_map.end())
return 0;
- return thread_id_map[id];
+ return IT->second;
}
StructuredData::ObjectSP
OpenPOWER on IntegriCloud