Fix the last testsuite regression from the apple-names stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141468 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/lldb/Symbol/SymbolContext.h b/include/lldb/Symbol/SymbolContext.h
index a5df5e1..a0b1862 100644
--- a/include/lldb/Symbol/SymbolContext.h
+++ b/include/lldb/Symbol/SymbolContext.h
@@ -229,8 +229,9 @@
     ///     The number of symbol contexts found.
     //------------------------------------------------------------------
     size_t
-    FindFunctionsByName (const ConstString &name, 
-                         bool include_symbols, 
+    FindFunctionsByName (const ConstString &name,
+                         uint32_t name_type_mask,
+                         bool include_symbols,
                          bool append, 
                          SymbolContextList &sc_list) const;
 
diff --git a/source/Expression/ClangExpressionDeclMap.cpp b/source/Expression/ClangExpressionDeclMap.cpp
index 368bbe6..e08985a 100644
--- a/source/Expression/ClangExpressionDeclMap.cpp
+++ b/source/Expression/ClangExpressionDeclMap.cpp
@@ -2182,7 +2182,8 @@
         {
             const bool include_symbols = true;
             const bool append = false;
-            m_parser_vars->m_sym_ctx.FindFunctionsByName (name, 
+            m_parser_vars->m_sym_ctx.FindFunctionsByName (name,
+                                                          eFunctionNameTypeBase,
                                                           include_symbols, 
                                                           append, 
                                                           sc_list);
diff --git a/source/Symbol/SymbolContext.cpp b/source/Symbol/SymbolContext.cpp
index 4a104b1..f635092 100644
--- a/source/Symbol/SymbolContext.cpp
+++ b/source/Symbol/SymbolContext.cpp
@@ -463,12 +463,14 @@
 
 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)
     {
@@ -477,12 +479,27 @@
     }
 
     if (module_sp)
-        module_sp->FindFunctions (name, eFunctionNameTypeBase | eFunctionNameTypeFull, include_symbols, true, sc_list);
+        module_sp->FindFunctions (name, name_type_mask, include_symbols, true, sc_list);
 
     if (target_sp)
-        target_sp->GetImages().FindFunctions (name, eFunctionNameTypeBase | eFunctionNameTypeFull, include_symbols, true, sc_list);
-
-    return sc_list.GetSize();
+    {
+        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, name_type_mask, include_symbols, true, sc_list);
+            }
+        }
+    }
+    return sc_list.GetSize() - old_size;
 }
 
 //lldb::VariableSP
diff --git a/test/expression_command/formatters/TestFormatters.py b/test/expression_command/formatters/TestFormatters.py
index 027191b..c4b7068 100644
--- a/test/expression_command/formatters/TestFormatters.py
+++ b/test/expression_command/formatters/TestFormatters.py
@@ -56,29 +56,29 @@
         self.runCmd("frame variable foo1.b -T")
         self.runCmd("frame variable foo1.b.b_ref -T")
 
-        self.expect("p *(new foo(47))",
+        self.expect("expression *(new foo(47))",
             substrs = ['(int) a = 47', '(bar) b = {', '(int) i = 94', '(baz) b = {', '(int) k = 99'])
 
         self.runCmd("type summary add -F formatters.foo_SummaryProvider foo")
 
-        self.expect("p new int(12)",
+        self.expect("expression new int(12)",
             substrs = ['(int *) $', ' = 0x'])
 
         self.runCmd("type summary add -s \"${var%pointer} -> ${*var%decimal}\" \"int *\"")
 
-        self.expect("p new int(12)",
+        self.expect("expression new int(12)",
             substrs = ['(int *) $', '= 0x', ' -> 12'])
 
-        self.expect("p foo1.a_ptr",
+        self.expect("expression foo1.a_ptr",
             substrs = ['(int *) $', '= 0x', ' -> 13'])
 
-        self.expect("p foo1",
+        self.expect("expression foo1",
             substrs = ['(foo) $', ' = a = 12, a_ptr = ', ' -> 13, i = 24, i_ptr = ', ' -> 25'])
 
-        self.expect("p new foo(47)",
+        self.expect("expression new foo(47)",
             substrs = ['(foo *) $', ' a = 47, a_ptr = ', ' -> 48, i = 94, i_ptr = ', ' -> 95'])
 
-        self.expect("p foo2",
+        self.expect("expression foo2",
             substrs = ['(foo) $', ' = a = 121, a_ptr = ', ' -> 122, i = 242, i_ptr = ', ' -> 243'])
 
         object_name = self.res.GetOutput()
@@ -88,13 +88,13 @@
         self.expect("frame variable foo2",
                     substrs = ['(foo)', 'foo2', ' = a = 121, a_ptr = ', ' -> 122, i = 242, i_ptr = ', ' -> 243'])
         
-        self.expect("p $" + object_name,
+        self.expect("expression $" + object_name,
             substrs = ['(foo) $', ' = a = 121, a_ptr = ', ' -> 122, i = 242, i_ptr = ', ' -> 243', ', h = 245 , k = 247'])
 
         self.runCmd("type summary delete foo")
         self.runCmd("type synthetic add --python-class foosynth.FooSyntheticProvider foo")
 
-        self.expect("p $" + object_name,
+        self.expect("expression $" + object_name,
             substrs = ['(foo) $', ' = {', '(int) *i_ptr = 243'])
 
         self.runCmd("n")
@@ -103,22 +103,22 @@
         self.runCmd("type synthetic delete foo")
         self.runCmd("type summary add -F formatters.foo_SummaryProvider foo")
 
-        self.expect("p foo2",
+        self.expect("expression foo2",
             substrs = ['(foo) $', ' = a = 7777, a_ptr = ', ' -> 122, i = 242, i_ptr = ', ' -> 8888'])
 
-        self.expect("p $" + object_name + '.a',
+        self.expect("expression $" + object_name + '.a',
             substrs = ['7777'])
 
-        self.expect("p *$" + object_name + '.b.i_ptr',
+        self.expect("expression *$" + object_name + '.b.i_ptr',
             substrs = ['8888'])
 
-        self.expect("p $" + object_name,
+        self.expect("expression $" + object_name,
             substrs = ['(foo) $', ' = a = 121, a_ptr = ', ' -> 122, i = 242, i_ptr = ', ' -> 8888', 'h = 245 , k = 247'])
 
         self.runCmd("type summary delete foo")
         self.runCmd("type synthetic add --python-class foosynth.FooSyntheticProvider foo")
 
-        self.expect("p $" + object_name,
+        self.expect("expression $" + object_name,
             substrs = ['(foo) $', ' = {', '(int) *i_ptr = 8888'])
 
         self.runCmd("n")
@@ -126,7 +126,7 @@
         self.runCmd("type synthetic delete foo")
         self.runCmd("type summary add -F formatters.foo_SummaryProvider foo")
 
-        self.expect("p $" + object_name,
+        self.expect("expression $" + object_name,
                     substrs = ['(foo) $', ' = a = 121, a_ptr = ', ' -> 122, i = 242, i_ptr = ', ' -> 8888', 'h = 9999 , k = 247'])
 
         process = self.dbg.GetSelectedTarget().GetProcess()
@@ -145,7 +145,7 @@
         self.expect("frame variable numbers",
                     substrs = ['1','2','3','4','5'])
 
-        self.expect("p numbers",
+        self.expect("expression numbers",
                     substrs = ['1','2','3','4','5'])
 
         frozen = frame.EvaluateExpression("&numbers")