Trying to submit 254476 one more time. This implement -gmodule debugging support.
It was previously reverted due to issues that showed up only on linux. I was able to reproduce these issues and fix the underlying cause.
So this is the same patch as 254476 with the following two fixes:
- Fix not trying to complete classes that don't have external sources
- Fix ClangASTSource::CompleteType() to check the decl context of types that it finds by basename to ensure we don't complete a type "S" with a type like "std::S". Before this fix ClangASTSource::CompleteType() would accept _any_ type that had a matching basename and copy it into the other type.
<rdar://problem/22992457>
llvm-svn: 254980
diff --git a/lldb/source/Symbol/SymbolVendor.cpp b/lldb/source/Symbol/SymbolVendor.cpp
index 97e2575..b361d40 100644
--- a/lldb/source/Symbol/SymbolVendor.cpp
+++ b/lldb/source/Symbol/SymbolVendor.cpp
@@ -361,6 +361,21 @@
 }
 
 size_t
+SymbolVendor::FindTypes (const std::vector<CompilerContext> &context, bool append, TypeMap& types)
+{
+    ModuleSP module_sp(GetModule());
+    if (module_sp)
+    {
+        lldb_private::Mutex::Locker locker(module_sp->GetMutex());
+        if (m_sym_file_ap.get())
+            return m_sym_file_ap->FindTypes(context, append, types);
+    }
+    if (!append)
+        types.Clear();
+    return 0;
+}
+
+size_t
 SymbolVendor::GetTypes (SymbolContextScope *sc_scope,
                         uint32_t type_mask,
                         lldb_private::TypeList &type_list)