From f3b07f9c5d97a53b7253f4ffa2133bf6d31e3aec Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Fri, 12 Mar 2021 08:47:55 -0800 Subject: [PATCH] [lldb] Remove unused StackFrame::TrackGlobalVariable Last used by the Go plugin which was removed in https://reviews.llvm.org/D54057. --- lldb/include/lldb/Target/StackFrame.h | 16 ---------------- lldb/source/Target/StackFrame.cpp | 25 ------------------------- 2 files changed, 41 deletions(-) diff --git a/lldb/include/lldb/Target/StackFrame.h b/lldb/include/lldb/Target/StackFrame.h index f57d7cc..1a9aaad 100644 --- a/lldb/include/lldb/Target/StackFrame.h +++ b/lldb/include/lldb/Target/StackFrame.h @@ -422,22 +422,6 @@ public: GetValueObjectForFrameVariable(const lldb::VariableSP &variable_sp, lldb::DynamicValueType use_dynamic); - /// Add an arbitrary Variable object (e.g. one that specifics a global or - /// static) to a StackFrame's list of ValueObjects. - /// - /// \params [in] variable_sp - /// The Variable to base this ValueObject on - /// - /// \params [in] use_dynamic - /// Whether the correct dynamic type of the variable should be - /// determined before creating the ValueObject, or if the static type - /// is sufficient. One of the DynamicValueType enumerated values. - /// - /// \return - /// A ValueObject for this variable. - lldb::ValueObjectSP TrackGlobalVariable(const lldb::VariableSP &variable_sp, - lldb::DynamicValueType use_dynamic); - /// Query this frame to determine what the default language should be when /// parsing expressions given the execution context. /// diff --git a/lldb/source/Target/StackFrame.cpp b/lldb/source/Target/StackFrame.cpp index 49e2a0d..5402ba2 100644 --- a/lldb/source/Target/StackFrame.cpp +++ b/lldb/source/Target/StackFrame.cpp @@ -1166,31 +1166,6 @@ StackFrame::GetValueObjectForFrameVariable(const VariableSP &variable_sp, return valobj_sp; } -ValueObjectSP StackFrame::TrackGlobalVariable(const VariableSP &variable_sp, - DynamicValueType use_dynamic) { - std::lock_guard guard(m_mutex); - if (IsHistorical()) - return ValueObjectSP(); - - // Check to make sure we aren't already tracking this variable? - ValueObjectSP valobj_sp( - GetValueObjectForFrameVariable(variable_sp, use_dynamic)); - if (!valobj_sp) { - // We aren't already tracking this global - VariableList *var_list = GetVariableList(true); - // If this frame has no variables, create a new list - if (var_list == nullptr) - m_variable_list_sp = std::make_shared(); - - // Add the global/static variable to this frame - m_variable_list_sp->AddVariable(variable_sp); - - // Now make a value object for it so we can track its changes - valobj_sp = GetValueObjectForFrameVariable(variable_sp, use_dynamic); - } - return valobj_sp; -} - bool StackFrame::IsInlined() { if (m_sc.block == nullptr) GetSymbolContext(eSymbolContextBlock); -- 2.7.4