Author: Benjamin Kramer Date: 2021-12-17T16:07:02+01:00 New Revision: 12873d1a670b4a82b5853dabc8b6ea4d300759af
URL: https://github.com/llvm/llvm-project/commit/12873d1a670b4a82b5853dabc8b6ea4d300759af DIFF: https://github.com/llvm/llvm-project/commit/12873d1a670b4a82b5853dabc8b6ea4d300759af.diff LOG: Silence unused variable warning in release builds lldb/source/Core/DataFileCache.cpp:278:10: warning: unused variable 'pos' [-Wunused-variable] auto pos = m_string_to_offset.find(s); ^ lldb/source/Core/DataFileCache.cpp:277:18: warning: unused variable 'stroff' [-Wunused-variable] const size_t stroff = encoder.GetByteSize() - strtab_offset; ^ Added: Modified: lldb/source/Core/DataFileCache.cpp Removed: ################################################################################ diff --git a/lldb/source/Core/DataFileCache.cpp b/lldb/source/Core/DataFileCache.cpp index 8d4dba307a124..3f52b925ef467 100644 --- a/lldb/source/Core/DataFileCache.cpp +++ b/lldb/source/Core/DataFileCache.cpp @@ -274,9 +274,8 @@ bool ConstStringTable::Encode(DataEncoder &encoder) { encoder.AppendU8(0); // Start the string table with with an empty string. for (auto s: m_strings) { // Make sure all of the offsets match up with what we handed out! - const size_t stroff = encoder.GetByteSize() - strtab_offset; - auto pos = m_string_to_offset.find(s); - assert(pos->second == stroff); + assert(m_string_to_offset.find(s)->second == + encoder.GetByteSize() - strtab_offset); // Append the C string into the encoder encoder.AppendCString(s.GetStringRef()); } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits