]> granicus.if.org Git - clang/commitdiff
Revert r174246, accidentally committed.
authorDavid Blaikie <dblaikie@gmail.com>
Sat, 2 Feb 2013 00:39:32 +0000 (00:39 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Sat, 2 Feb 2013 00:39:32 +0000 (00:39 +0000)
This reverts commit 1513eb9284c23acfd19cf742b95996fbb11ca741.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174249 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/CGDebugInfo.h
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CodeGenFunction.cpp

index 6d61c52af5f2f8ba018963f4caa52f87c0c18783..5e60bd8f66c64bb666be8f041e8c9a305dd9d026 100644 (file)
@@ -111,9 +111,6 @@ llvm::DIDescriptor CGDebugInfo::getContextDescriptor(const Decl *Context) {
       return llvm::DIDescriptor(Ty);
     }
   }
-
-  if (!LexicalBlockStack.empty())
-    return llvm::DIDescriptor(LexicalBlockStack.back());
   return TheCU;
 }
 
@@ -2825,12 +2822,6 @@ void CGDebugInfo::EmitGlobalVariable(const ValueDecl *VD,
                                 getStaticDataMemberDeclaration(VD));
 }
 
-void CGDebugInfo::EmitUsingDirectiveDecl(const UsingDirectiveDecl &UD) {
-  SourceLocation Loc = UD.getNamespaceKeyLocation();
-  llvm::DIFile Unit = getOrCreateFile(Loc);
-  DBuilder.createUsingDirective(getContextDescriptor(&UD), Unit, getLineNumber(Loc), getOrCreateNameSpace(UD.getNominatedNamespace()));
-}
-
 /// getOrCreateNamesSpace - Return namespace descriptor for the given
 /// namespace decl.
 llvm::DINameSpace 
index bcda906a027228d344cbd9994ea63fb62c73f498..fbbee0b3d2bc65cbf2beb80f7a947a5ad9c4b3c0 100644 (file)
@@ -34,7 +34,6 @@ namespace clang {
   class ObjCInterfaceDecl;
   class ClassTemplateSpecializationDecl;
   class GlobalDecl;
-  class UsingDirectiveDecl;
 
 namespace CodeGen {
   class CodeGenModule;
@@ -248,9 +247,6 @@ public:
   /// EmitGlobalVariable - Emit global variable's debug info.
   void EmitGlobalVariable(const ValueDecl *VD, llvm::Constant *Init);
 
-  /// \brief Emit a C++ using directive.
-  void EmitUsingDirectiveDecl(const UsingDirectiveDecl &UD);
-
   /// getOrCreateRecordType - Emit record type's standalone debug info. 
   llvm::DIType getOrCreateRecordType(QualType Ty, SourceLocation L);
 
index 75b45cc28be30c197d317a7c0e335b3184e6fd39..a43a38360b1e078ae9c634c41ac3dcfa6a8aecd5 100644 (file)
@@ -78,18 +78,14 @@ void CodeGenFunction::EmitDecl(const Decl &D) {
   case Decl::CXXRecord: // struct/union/class X; [C++]
   case Decl::Using:          // using X; [C++]
   case Decl::UsingShadow:
+  case Decl::UsingDirective: // using namespace X; [C++]
   case Decl::NamespaceAlias:
   case Decl::StaticAssert: // static_assert(X, ""); [C++0x]
   case Decl::Label:        // __label__ x;
   case Decl::Import:
     // None of these decls require codegen support.
     return;
-  case Decl::UsingDirective: { // using namespace X; [C++]
-    if (CGDebugInfo *DI = getDebugInfo()) {
-      DI->EmitUsingDirectiveDecl(cast<UsingDirectiveDecl>(D));
-    }
-    return;
-  }
+
   case Decl::Var: {
     const VarDecl &VD = cast<VarDecl>(D);
     assert(VD.isLocalVarDecl() &&
index 50e52c69f805bb67576ea74e4572cc8219a40ec1..ec139df3ef1111e26681f4187209a58b8f6842b1 100644 (file)
@@ -191,7 +191,6 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) {
   // Emit debug descriptor for function end.
   if (CGDebugInfo *DI = getDebugInfo()) {
     DI->EmitFunctionEnd(Builder);
-    DI->setLocation(EndLoc);
   }
 
   EmitFunctionEpilog(*CurFnInfo);