[Lldb-commits] [lldb] r141899 - in /lldb/trunk: include/lldb/Symbol/SymbolContext.h source/Expression/ClangExpressionDeclMap.cpp source/Symbol/SymbolContext.cpp
Sean Callanan
scallanan at apple.com
Thu Oct 13 15:18:56 PDT 2011
Author: spyffe
Date: Thu Oct 13 17:18:56 2011
New Revision: 141899
URL: http://llvm.org/viewvc/llvm-project?rev=141899&view=rev
Log:
Cleaned up a few functions that never get used.
Specifically, the expression parser used to use
functions attached to SymbolContext to do lookups,
but nowadays it searches a ModuleList or Module
directly instead. These functions had no
remaining clients so I removed them to prevent
bit rot.
I also removed a stray callback function from
ClangExpressionDeclMap.
Modified:
lldb/trunk/include/lldb/Symbol/SymbolContext.h
lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
lldb/trunk/source/Symbol/SymbolContext.cpp
Modified: lldb/trunk/include/lldb/Symbol/SymbolContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolContext.h?rev=141899&r1=141898&r2=141899&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/SymbolContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/SymbolContext.h Thu Oct 13 17:18:56 2011
@@ -220,54 +220,6 @@
uint32_t
GetResolvedMask () const;
-
- //------------------------------------------------------------------
- /// Find a function matching the given name, working out from this
- /// symbol context.
- ///
- /// @return
- /// The number of symbol contexts found.
- //------------------------------------------------------------------
- size_t
- FindFunctionsByName (const ConstString &name,
- uint32_t name_type_mask,
- bool include_symbols,
- bool append,
- SymbolContextList &sc_list) const;
-
-
- ClangNamespaceDecl
- FindNamespace (const ConstString &name) const;
-
- //------------------------------------------------------------------
- /// Find a variable matching the given name, working out from this
- /// symbol context.
- ///
- /// @return
- /// A shared pointer to the variable found.
- //------------------------------------------------------------------
- //lldb::VariableSP
- //FindVariableByName (const char *name) const;
-
- //------------------------------------------------------------------
- /// Find a type matching the given name, working out from this
- /// symbol context.
- ///
- /// @return
- /// A shared pointer to the variable found.
- //------------------------------------------------------------------
- lldb::TypeSP
- FindTypeByName (const ConstString &name) const;
-
-// static SymbolContext
-// CreateSymbolContextFromDescription (lldb::TargetSP &target,
-// const char *module,
-// const char *comp_unit,
-// const char *function,
-// const char *block_spec
-// const char *line_number,
-// const char *symbol);
-
//------------------------------------------------------------------
/// Find a name of the innermost function for the symbol context.
///
Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=141899&r1=141898&r2=141899&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Thu Oct 13 17:18:56 2011
@@ -1970,23 +1970,6 @@
return NULL;
}
-// This is a callback used with Variable::GetValuesForVariableExpressionPath
-
-static uint32_t GetVariableCallback (void *baton,
- const char *name,
- VariableList &variable_list)
-{
- Target *target = static_cast<Target *>(baton);
- if (target)
- {
- return target->GetImages().FindGlobalVariables (ConstString(name),
- true,
- UINT32_MAX,
- variable_list);
- }
- return 0;
-}
-
lldb::VariableSP
ClangExpressionDeclMap::FindGlobalVariable
(
Modified: lldb/trunk/source/Symbol/SymbolContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolContext.cpp?rev=141899&r1=141898&r2=141899&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/SymbolContext.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolContext.cpp Thu Oct 13 17:18:56 2011
@@ -452,83 +452,6 @@
return false;
}
-ClangNamespaceDecl
-SymbolContext::FindNamespace (const ConstString &name) const
-{
- ClangNamespaceDecl namespace_decl;
- if (module_sp)
- namespace_decl = module_sp->GetSymbolVendor()->FindNamespace (*this, name, NULL);
- return namespace_decl;
-}
-
-size_t
-SymbolContext::FindFunctionsByName (const ConstString &name,
- uint32_t name_type_mask,
- bool include_symbols,
- bool append,
- SymbolContextList &sc_list) const
-{
- if (!append)
- sc_list.Clear();
- uint32_t old_size = sc_list.GetSize();
-
- if (function != NULL)
- {
- // FIXME: Look in the class of the current function, if it exists,
- // for methods matching name.
- }
-
- if (module_sp)
- module_sp->FindFunctions (name, NULL, name_type_mask, include_symbols, true, sc_list);
-
- if (target_sp)
- {
- if (!module_sp)
- {
- target_sp->GetImages().FindFunctions (name, name_type_mask, include_symbols, true, sc_list);
- }
- else
- {
- ModuleList &modules = target_sp->GetImages();
- uint32_t num_modules = modules.GetSize();
- for (uint32_t i = 0; i < num_modules; i++)
- {
- ModuleSP iter_module_sp = modules.GetModuleAtIndex(i);
- if (module_sp != iter_module_sp)
- iter_module_sp->FindFunctions (name, NULL, name_type_mask, include_symbols, true, sc_list);
- }
- }
- }
- return sc_list.GetSize() - old_size;
-}
-
-//lldb::VariableSP
-//SymbolContext::FindVariableByName (const char *name) const
-//{
-// lldb::VariableSP return_value;
-// return return_value;
-//}
-
-lldb::TypeSP
-SymbolContext::FindTypeByName (const ConstString &name) const
-{
- lldb::TypeSP return_value;
-
- TypeList types;
-
- if (module_sp && module_sp->FindTypes (*this, name, NULL, false, 1, types))
- return types.GetTypeAtIndex(0);
-
- SymbolContext sc_for_global_search;
-
- sc_for_global_search.target_sp = target_sp;
-
- if (!return_value.get() && target_sp && target_sp->GetImages().FindTypes (sc_for_global_search, name, false, 1, types))
- return types.GetTypeAtIndex(0);
-
- return return_value;
-}
-
bool
SymbolContext::GetParentOfInlinedScope (const Address &curr_frame_pc,
SymbolContext &next_frame_sc,
More information about the lldb-commits
mailing list