Revert r261634 "Supporting all entities declared in lexical scope in LLVM debug info." and r261657

r261634 and r261633 seems to have caused PR26715. r261657 depends on the former two.

llvm-svn: 261670
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index 809012b..5b88ef1 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -83,7 +83,11 @@
   case Decl::UsingShadow:
   case Decl::ObjCTypeParam:
     llvm_unreachable("Declaration should not be in declstmts!");
-  case Decl::Function:     // void X();
+  case Decl::Function:  // void X();
+  case Decl::Record:    // struct/union/class X;
+  case Decl::Enum:      // enum X;
+  case Decl::EnumConstant: // enum ? { X = ? }
+  case Decl::CXXRecord: // struct/union/class X; [C++]
   case Decl::StaticAssert: // static_assert(X, ""); [C++0x]
   case Decl::Label:        // __label__ x;
   case Decl::Import:
@@ -93,21 +97,13 @@
     // None of these decls require codegen support.
     return;
 
-  case Decl::Record:       // struct/union/class X;
-  case Decl::Enum:         // enum X;
-  case Decl::EnumConstant: // enum ? { X = ? }
-  case Decl::CXXRecord:    // struct/union/class X; [C++]
-    if (CGDebugInfo *DI = getDebugInfo())
-      DI->recordDeclarationLexicalScope(D);
-    return;
-
   case Decl::NamespaceAlias:
     if (CGDebugInfo *DI = getDebugInfo())
-      DI->EmitNamespaceAlias(cast<NamespaceAliasDecl>(D));
+        DI->EmitNamespaceAlias(cast<NamespaceAliasDecl>(D));
     return;
   case Decl::Using:          // using X; [C++]
     if (CGDebugInfo *DI = getDebugInfo())
-      DI->EmitUsingDecl(cast<UsingDecl>(D));
+        DI->EmitUsingDecl(cast<UsingDecl>(D));
     return;
   case Decl::UsingDirective: // using namespace X; [C++]
     if (CGDebugInfo *DI = getDebugInfo())
@@ -125,9 +121,6 @@
     const TypedefNameDecl &TD = cast<TypedefNameDecl>(D);
     QualType Ty = TD.getUnderlyingType();
 
-    if (CGDebugInfo *DI = getDebugInfo())
-      DI->recordDeclarationLexicalScope(D);
-
     if (Ty->isVariablyModifiedType())
       EmitVariablyModifiedType(Ty);
   }