clayborg accepted this revision. clayborg added a comment. This revision is now accepted and ready to land.
Looks fine. Might want to make "h" const in places noted by inlined comments, but other than that it looks good. ================ Comment at: source/Core/ConstString.cpp:39 @@ -38,2 +38,3 @@ { - const StringPoolEntryType&entry = GetStringMapEntryFromKeyData (ccstr); + uint8_t h = hash (llvm::StringRef(ccstr)); + llvm::sys::SmartScopedReader<false> rlock(m_string_pools[h].m_mutex); ---------------- const uint8_t h? ================ Comment at: source/Core/ConstString.cpp:52 @@ +51,3 @@ + { + uint8_t h = hash (llvm::StringRef(ccstr)); + llvm::sys::SmartScopedReader<false> rlock(m_string_pools[h].m_mutex); ---------------- const uint8_t h? ================ Comment at: source/Core/ConstString.cpp:65 @@ +64,3 @@ + { + uint8_t h = hash (llvm::StringRef(key_ccstr)); + llvm::sys::SmartScopedWriter<false> wlock(m_string_pools[h].m_mutex); ---------------- const uint8_t h? ================ Comment at: source/Core/ConstString.cpp:70 @@ +69,3 @@ + { + uint8_t h = hash (llvm::StringRef(value_ccstr)); + llvm::sys::SmartScopedWriter<false> wlock(m_string_pools[h].m_mutex); ---------------- const uint8_t h? ================ Comment at: source/Core/ConstString.cpp:139 @@ +138,3 @@ + // mangled const string... + uint8_t h = hash (llvm::StringRef(mangled_ccstr)); + llvm::sys::SmartScopedWriter<false> wlock(m_string_pools[h].m_mutex); ---------------- const uint8_t h? http://reviews.llvm.org/D13941 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits