[PATCH] D22983: [lldb][tsan] Perform one map lookup instead of two (NFC)
Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 1 09:45:18 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL277350: [lldb][tsan] Perform one map lookup instead of two (NFC) (authored by vedantk).
Changed prior to commit:
https://reviews.llvm.org/D22983?vs=66200&id=66334#toc
Repository:
rL LLVM
https://reviews.llvm.org/D22983
Files:
lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp
Index: lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp
===================================================================
--- lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp
+++ lldb/trunk/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp
@@ -335,10 +335,11 @@
}
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22983.66334.patch
Type: text/x-patch
Size: 696 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160801/ec7579a4/attachment.bin>
More information about the llvm-commits
mailing list