Added ClangNamespaceDecl * parameters to several
core Module functions that the expression parser
will soon be using.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141766 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBModule.cpp b/source/API/SBModule.cpp
index 790d8dd..98bb195 100644
--- a/source/API/SBModule.cpp
+++ b/source/API/SBModule.cpp
@@ -344,7 +344,8 @@
     if (m_opaque_sp)
     {
         const bool symbols_ok = true;
-        return m_opaque_sp->FindFunctions (ConstString(name), 
+        return m_opaque_sp->FindFunctions (ConstString(name),
+                                           NULL,
                                            name_type_mask, 
                                            symbols_ok, 
                                            append, 
@@ -361,7 +362,8 @@
     if (m_opaque_sp)
     {
         VariableList variable_list;
-        const uint32_t match_count = m_opaque_sp->FindGlobalVariables (ConstString (name), 
+        const uint32_t match_count = m_opaque_sp->FindGlobalVariables (ConstString (name),
+                                                                       NULL,
                                                                        false, 
                                                                        max_matches,
                                                                        variable_list);
@@ -398,6 +400,7 @@
 
         num_matches = m_opaque_sp->FindTypes(sc,
                                              name,
+                                             NULL,
                                              false,
                                              1,
                                              type_list);
@@ -423,6 +426,7 @@
         
         num_matches = m_opaque_sp->FindTypes(sc,
                                              name,
+                                             NULL,
                                              false,
                                              UINT32_MAX,
                                              type_list);
diff --git a/source/Breakpoint/BreakpointResolverName.cpp b/source/Breakpoint/BreakpointResolverName.cpp
index 9df1dd7..7a9593b 100644
--- a/source/Breakpoint/BreakpointResolverName.cpp
+++ b/source/Breakpoint/BreakpointResolverName.cpp
@@ -16,6 +16,7 @@
 #include "lldb/Breakpoint/BreakpointLocation.h"
 #include "lldb/Core/Log.h"
 #include "lldb/Core/StreamString.h"
+#include "lldb/Symbol/ClangNamespaceDecl.h"
 #include "lldb/Target/Target.h"
 
 using namespace lldb;
@@ -128,17 +129,18 @@
             if (context.module_sp)
             {
                 uint32_t num_functions = context.module_sp->FindFunctions (m_func_name, 
-                                                      m_func_name_type_mask, 
-                                                      include_symbols, 
-                                                      append, 
-                                                      func_list);
+                                                                           NULL,
+                                                                           m_func_name_type_mask, 
+                                                                           include_symbols, 
+                                                                           append, 
+                                                                           func_list);
                 // If the search filter specifies a Compilation Unit, then we don't need to bother to look in plain
                 // symbols, since all the ones from a set compilation unit will have been found above already.
                 
                 if (num_functions == 0 && !filter_by_cu)
                 {
                     if (m_func_name_type_mask & (eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeAuto))
-                        context.module_sp->FindSymbolsWithNameAndType (m_func_name, eSymbolTypeCode, sym_list);
+                        context.module_sp->FindSymbolsWithNameAndType (m_func_name, NULL, eSymbolTypeCode, sym_list);
                 }
             }
             break;
diff --git a/source/Commands/CommandObjectMemory.cpp b/source/Commands/CommandObjectMemory.cpp
index 9629c84..1aa92fd 100644
--- a/source/Commands/CommandObjectMemory.cpp
+++ b/source/Commands/CommandObjectMemory.cpp
@@ -25,6 +25,7 @@
 #include "lldb/Interpreter/OptionGroupFormat.h"
 #include "lldb/Interpreter/OptionGroupOutputFile.h"
 #include "lldb/Interpreter/OptionGroupValueObjectDisplay.h"
+#include "lldb/Symbol/ClangNamespaceDecl.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/StackFrame.h"
 
@@ -447,8 +448,9 @@
                 sc = frame->GetSymbolContext (eSymbolContextModule);
                 if (sc.module_sp)
                 {
-                    sc.module_sp->FindTypes (sc, 
-                                             lookup_type_name, 
+                    sc.module_sp->FindTypes (sc,
+                                             lookup_type_name,
+                                             NULL,
                                              append, 
                                              1, 
                                              type_list);
diff --git a/source/Commands/CommandObjectTarget.cpp b/source/Commands/CommandObjectTarget.cpp
index 2be8e8d..3c92f8e 100644
--- a/source/Commands/CommandObjectTarget.cpp
+++ b/source/Commands/CommandObjectTarget.cpp
@@ -1498,7 +1498,8 @@
         else
         {
             ConstString function_name (name);
-            num_matches = module->FindFunctions (function_name, 
+            num_matches = module->FindFunctions (function_name,
+                                                 NULL,
                                                  eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeMethod | eFunctionNameTypeSelector, 
                                                  include_symbols,
                                                  append, 
@@ -1543,7 +1544,7 @@
             //            else
             //            {
             ConstString name(name_cstr);
-            num_matches = module->FindTypes(sc, name, true, UINT32_MAX, type_list);
+            num_matches = module->FindTypes(sc, name, NULL, true, UINT32_MAX, type_list);
             //            }
             
             if (num_matches)
diff --git a/source/Core/AddressResolverName.cpp b/source/Core/AddressResolverName.cpp
index 040a862..baf62f2 100644
--- a/source/Core/AddressResolverName.cpp
+++ b/source/Core/AddressResolverName.cpp
@@ -12,6 +12,7 @@
 // Project includes
 #include "lldb/Core/Log.h"
 #include "lldb/Core/StreamString.h"
+#include "lldb/Symbol/ClangNamespaceDecl.h"
 #include "lldb/lldb-private-log.h"
 
 using namespace lldb;
@@ -109,10 +110,12 @@
     case AddressResolver::Exact:
         if (context.module_sp)
         {
-            context.module_sp->FindSymbolsWithNameAndType (m_func_name, 
+            context.module_sp->FindSymbolsWithNameAndType (m_func_name,
+                                                           NULL,
                                                            eSymbolTypeCode, 
                                                            sym_list);
-            context.module_sp->FindFunctions (m_func_name, 
+            context.module_sp->FindFunctions (m_func_name,
+                                              NULL,
                                               eFunctionNameTypeBase | eFunctionNameTypeFull | eFunctionNameTypeMethod | eFunctionNameTypeSelector,
                                               include_symbols,
                                               append, 
diff --git a/source/Core/Disassembler.cpp b/source/Core/Disassembler.cpp
index 4ebe688..e219c16 100644
--- a/source/Core/Disassembler.cpp
+++ b/source/Core/Disassembler.cpp
@@ -24,6 +24,7 @@
 #include "lldb/Core/RegularExpression.h"
 #include "lldb/Core/Timer.h"
 #include "lldb/Interpreter/NamedOptionValue.h"
+#include "lldb/Symbol/ClangNamespaceDecl.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Target/Process.h"
@@ -166,7 +167,8 @@
         const bool include_symbols = true;
         if (module)
         {
-            module->FindFunctions (name, 
+            module->FindFunctions (name,
+                                   NULL,
                                    eFunctionNameTypeBase | 
                                    eFunctionNameTypeFull | 
                                    eFunctionNameTypeMethod | 
diff --git a/source/Core/Module.cpp b/source/Core/Module.cpp
index e2c921e..9139548 100644
--- a/source/Core/Module.cpp
+++ b/source/Core/Module.cpp
@@ -350,7 +350,7 @@
 
 
 uint32_t
-Module::FindGlobalVariables(const ConstString &name, bool append, uint32_t max_matches, VariableList& variables)
+Module::FindGlobalVariables(const ConstString &name, const ClangNamespaceDecl *namespace_decl, bool append, uint32_t max_matches, VariableList& variables)
 {
     SymbolVendor *symbols = GetSymbolVendor ();
     if (symbols)
@@ -389,7 +389,8 @@
 }
 
 uint32_t
-Module::FindFunctions (const ConstString &name, 
+Module::FindFunctions (const ConstString &name,
+                       const ClangNamespaceDecl *namespace_decl,
                        uint32_t name_type_mask, 
                        bool include_symbols, 
                        bool append, 
@@ -509,7 +510,7 @@
 }
 
 uint32_t
-Module::FindTypes (const SymbolContext& sc, const ConstString &name, bool append, uint32_t max_matches, TypeList& types)
+Module::FindTypes (const SymbolContext& sc,  const ConstString &name, const ClangNamespaceDecl *namespace_decl, bool append, uint32_t max_matches, TypeList& types)
 {
     uint32_t retval = FindTypes_Impl(sc, name, append, max_matches, types);
     
@@ -686,7 +687,7 @@
 }
 
 size_t
-Module::FindSymbolsWithNameAndType (const ConstString &name, SymbolType symbol_type, SymbolContextList &sc_list)
+Module::FindSymbolsWithNameAndType (const ConstString &name, const ClangNamespaceDecl *namespace_decl, SymbolType symbol_type, SymbolContextList &sc_list)
 {
     // No need to protect this call using m_mutex all other method calls are
     // already thread safe.
diff --git a/source/Core/ModuleList.cpp b/source/Core/ModuleList.cpp
index 4ee475b..7c35c9b 100644
--- a/source/Core/ModuleList.cpp
+++ b/source/Core/ModuleList.cpp
@@ -16,6 +16,7 @@
 #include "lldb/Core/Log.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Host/Symbols.h"
+#include "lldb/Symbol/ClangNamespaceDecl.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/VariableList.h"
 
@@ -186,7 +187,7 @@
     collection::const_iterator pos, end = m_modules.end();
     for (pos = m_modules.begin(); pos != end; ++pos)
     {
-        (*pos)->FindFunctions (name, name_type_mask, include_symbols, true, sc_list);
+        (*pos)->FindFunctions (name, NULL, name_type_mask, include_symbols, true, sc_list);
     }
     
     return sc_list.GetSize();
@@ -221,7 +222,7 @@
     collection::iterator pos, end = m_modules.end();
     for (pos = m_modules.begin(); pos != end; ++pos)
     {
-        (*pos)->FindGlobalVariables (name, append, max_matches, variable_list);
+        (*pos)->FindGlobalVariables (name, NULL, append, max_matches, variable_list);
     }
     return variable_list.GetSize() - initial_size;
 }
@@ -253,7 +254,7 @@
     sc_list.Clear();
     collection::iterator pos, end = m_modules.end();
     for (pos = m_modules.begin(); pos != end; ++pos)
-        (*pos)->FindSymbolsWithNameAndType (name, symbol_type, sc_list);
+        (*pos)->FindSymbolsWithNameAndType (name, NULL, symbol_type, sc_list);
     return sc_list.GetSize();
 }
 
@@ -423,7 +424,7 @@
     for (pos = m_modules.begin(); pos != end; ++pos)
     {
         if (sc.module_sp.get() == NULL || sc.module_sp.get() == (*pos).get())
-            total_matches += (*pos)->FindTypes (sc, name, true, max_matches, types);
+            total_matches += (*pos)->FindTypes (sc, name, NULL, true, max_matches, types);
 
         if (total_matches >= max_matches)
             break;
diff --git a/source/Core/SourceManager.cpp b/source/Core/SourceManager.cpp
index 743f2d1..482ccbb 100644
--- a/source/Core/SourceManager.cpp
+++ b/source/Core/SourceManager.cpp
@@ -16,6 +16,7 @@
 #include "lldb/Core/DataBuffer.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/Stream.h"
+#include "lldb/Symbol/ClangNamespaceDecl.h"
 #include "lldb/Symbol/SymbolContext.h"
 #include "lldb/Target/Target.h"
 
@@ -244,7 +245,7 @@
             ConstString main_name("main");
             bool symbols_okay = false;  // Force it to be a debug symbol.
             bool append = false;
-            num_matches = executable_ptr->FindFunctions (main_name, lldb::eFunctionNameTypeBase, symbols_okay, append, sc_list);
+            num_matches = executable_ptr->FindFunctions (main_name, NULL, lldb::eFunctionNameTypeBase, symbols_okay, append, sc_list);
             for (uint32_t idx = 0; idx < num_matches; idx++)
             {
                 SymbolContext sc;
diff --git a/source/Expression/ClangExpressionDeclMap.cpp b/source/Expression/ClangExpressionDeclMap.cpp
index 9d6e48f..1c932b3 100644
--- a/source/Expression/ClangExpressionDeclMap.cpp
+++ b/source/Expression/ClangExpressionDeclMap.cpp
@@ -626,7 +626,7 @@
 )
 {
     if (sym_ctx.module_sp)
-       sym_ctx.module_sp->FindSymbolsWithNameAndType(name, eSymbolTypeCode, sc_list);
+       sym_ctx.module_sp->FindSymbolsWithNameAndType(name, NULL, eSymbolTypeCode, sc_list);
     
     if (!sc_list.GetSize())
         sym_ctx.target_sp->GetImages().FindSymbolsWithNameAndType(name, eSymbolTypeCode, sc_list);
diff --git a/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index 78ca17f..5819def 100644
--- a/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -22,6 +22,7 @@
 #include "lldb/Core/StreamString.h"
 #include "lldb/Core/Timer.h"
 #include "lldb/Core/UUID.h"
+#include "lldb/Symbol/ClangNamespaceDecl.h"
 #include "lldb/Symbol/ObjectFile.h"
 
 
@@ -1695,7 +1696,7 @@
         
         SymbolContextList contexts;
         SymbolContext context;
-        if (!m_module->FindSymbolsWithNameAndType(ConstString ("start"), eSymbolTypeCode, contexts))
+        if (!m_module->FindSymbolsWithNameAndType(ConstString ("start"), NULL, eSymbolTypeCode, contexts))
             return m_entry_point_address;
         
         contexts.GetContextAtIndex(0, context);
diff --git a/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.cpp b/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.cpp
index c5f3e40..7aa33c3 100644
--- a/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.cpp
+++ b/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.cpp
@@ -19,6 +19,7 @@
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Core/RegisterValue.h"
 #include "lldb/Core/ValueObjectVariable.h"
+#include "lldb/Symbol/ClangNamespaceDecl.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/VariableList.h"
 #include "lldb/Target/Process.h"
@@ -131,7 +132,8 @@
         Module *exe_module = m_process->GetTarget().GetExecutableModulePointer();
         if (exe_module)
         {
-            if (exe_module->FindGlobalVariables (g_thread_list_name, 
+            if (exe_module->FindGlobalVariables (g_thread_list_name,
+                                                 NULL,
                                                  append, 
                                                  max_matches,
                                                  variable_list))
diff --git a/source/Symbol/SymbolContext.cpp b/source/Symbol/SymbolContext.cpp
index f635092..261b148 100644
--- a/source/Symbol/SymbolContext.cpp
+++ b/source/Symbol/SymbolContext.cpp
@@ -479,7 +479,7 @@
     }
 
     if (module_sp)
-        module_sp->FindFunctions (name, name_type_mask, include_symbols, true, sc_list);
+        module_sp->FindFunctions (name, NULL, name_type_mask, include_symbols, true, sc_list);
 
     if (target_sp)
     {
@@ -495,7 +495,7 @@
             {
                 ModuleSP iter_module_sp = modules.GetModuleAtIndex(i);
                 if (module_sp != iter_module_sp)
-                    iter_module_sp->FindFunctions (name, name_type_mask, include_symbols, true, sc_list);
+                    iter_module_sp->FindFunctions (name, NULL, name_type_mask, include_symbols, true, sc_list);
             }
         }
     }
@@ -516,7 +516,7 @@
         
     TypeList types;
     
-    if (module_sp && module_sp->FindTypes (*this, name, false, 1, types))
+    if (module_sp && module_sp->FindTypes (*this, name, NULL, false, 1, types))
         return types.GetTypeAtIndex(0);
     
     SymbolContext sc_for_global_search;