r174249 - Revert r174246, accidentally committed.

David Blaikie dblaikie at gmail.com
Fri Feb 1 16:39:32 PST 2013


Author: dblaikie
Date: Fri Feb  1 18:39:32 2013
New Revision: 174249

URL: http://llvm.org/viewvc/llvm-project?rev=174249&view=rev
Log:
Revert r174246, accidentally committed.

This reverts commit 1513eb9284c23acfd19cf742b95996fbb11ca741.

Modified:
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
    cfe/trunk/lib/CodeGen/CGDebugInfo.h
    cfe/trunk/lib/CodeGen/CGDecl.cpp
    cfe/trunk/lib/CodeGen/CodeGenFunction.cpp

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=174249&r1=174248&r2=174249&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Fri Feb  1 18:39:32 2013
@@ -111,9 +111,6 @@ llvm::DIDescriptor CGDebugInfo::getConte
       return llvm::DIDescriptor(Ty);
     }
   }
-
-  if (!LexicalBlockStack.empty())
-    return llvm::DIDescriptor(LexicalBlockStack.back());
   return TheCU;
 }
 
@@ -2825,12 +2822,6 @@ void CGDebugInfo::EmitGlobalVariable(con
                                 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 

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.h?rev=174249&r1=174248&r2=174249&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.h (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.h Fri Feb  1 18:39:32 2013
@@ -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);
 

Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDecl.cpp?rev=174249&r1=174248&r2=174249&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDecl.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDecl.cpp Fri Feb  1 18:39:32 2013
@@ -78,18 +78,14 @@ void CodeGenFunction::EmitDecl(const Dec
   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() &&

Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.cpp?rev=174249&r1=174248&r2=174249&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.cpp Fri Feb  1 18:39:32 2013
@@ -191,7 +191,6 @@ void CodeGenFunction::FinishFunction(Sou
   // Emit debug descriptor for function end.
   if (CGDebugInfo *DI = getDebugInfo()) {
     DI->EmitFunctionEnd(Builder);
-    DI->setLocation(EndLoc);
   }
 
   EmitFunctionEpilog(*CurFnInfo);





More information about the cfe-commits mailing list