Author: Fangrui Song Date: 2023-07-06T20:33:09-07:00 New Revision: 7319d7dbcfa94998ae3befeff0b84140dcf29a69
URL: https://github.com/llvm/llvm-project/commit/7319d7dbcfa94998ae3befeff0b84140dcf29a69 DIFF: https://github.com/llvm/llvm-project/commit/7319d7dbcfa94998ae3befeff0b84140dcf29a69.diff LOG: [lldb] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after D154542 Added: Modified: lldb/source/Target/TargetList.cpp Removed: ################################################################################ diff --git a/lldb/source/Target/TargetList.cpp b/lldb/source/Target/TargetList.cpp index 376b15ca706bee..cb198e388011ad 100644 --- a/lldb/source/Target/TargetList.cpp +++ b/lldb/source/Target/TargetList.cpp @@ -559,15 +559,16 @@ bool TargetList::AnyTargetContainsModule(Module &module) { void TargetList::RegisterInProcessTarget(TargetSP target_sp) { std::lock_guard<std::recursive_mutex> guard(m_target_list_mutex); - std::unordered_set<TargetSP>::iterator iter; - bool was_added; - std::tie(iter, was_added) = m_in_process_target_list.insert(target_sp); + [[maybe_unused]] bool was_added; + std::tie(std::ignore, was_added) = + m_in_process_target_list.insert(target_sp); assert(was_added && "Target pointer was left in the in-process map"); } void TargetList::UnregisterInProcessTarget(TargetSP target_sp) { std::lock_guard<std::recursive_mutex> guard(m_target_list_mutex); - bool was_present = m_in_process_target_list.erase(target_sp); + [[maybe_unused]] bool was_present = + m_in_process_target_list.erase(target_sp); assert(was_present && "Target pointer being removed was not registered"); } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits