Disable recognition of "using" declarations at translation-unit level.

Currently CountDeclLevels uses the ASTs which have no distinction between
separate translation units.  If one .o file has a "using" declaration at
translation unit level, that "using" declaration will be in the same translation
unit as functions from other .o files in the same module.  This leads to
erroneous name conflicts as the CountDeclLevels-based function filtering logic
accepts too many fucntions.

In the future we will identify the translation units for top-level Decls more
reliably and restore that functionality.  There's a TODO to that effect in the
code.

llvm-svn: 260747
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index 1d4d265..829e11a 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -9926,6 +9926,15 @@
             {
                 if (searched.find(it->second) != searched.end())
                     continue;
+                
+                // Currently DWARF has one shared translation unit for all Decls at top level, so this
+                // would erroneously find using statements anywhere.  So don't look at the top-level
+                // translation unit.
+                // TODO fix this and add a testcase that depends on it.
+                
+                if (llvm::isa<clang::TranslationUnitDecl>(it->second))
+                    continue;
+                
                 searched.insert(it->second);
                 symbol_file->ParseDeclsForContext(CompilerDeclContext(this, it->second));