r179839 - Revert "PR14606: Debug info for using directives/DW_TAG_imported_module"
Eric Christopher
echristo at gmail.com
Fri Apr 19 00:46:36 PDT 2013
Author: echristo
Date: Fri Apr 19 02:46:36 2013
New Revision: 179839
URL: http://llvm.org/viewvc/llvm-project?rev=179839&view=rev
Log:
Revert "PR14606: Debug info for using directives/DW_TAG_imported_module"
This reverts commit r179837 as it seems to be causing test failures.
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
cfe/trunk/lib/CodeGen/CGDebugInfo.h
cfe/trunk/lib/CodeGen/CGDecl.cpp
cfe/trunk/test/CodeGenCXX/debug-info-namespace.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=179839&r1=179838&r2=179839&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Fri Apr 19 02:46:36 2013
@@ -2929,13 +2929,6 @@ void CGDebugInfo::EmitGlobalVariable(con
getStaticDataMemberDeclaration(VD));
}
-void CGDebugInfo::EmitUsingDirective(const UsingDirectiveDecl &UD) {
- DBuilder.createImportedModule(
- getContextDescriptor(cast<Decl>(UD.getDeclContext())),
- getOrCreateNameSpace(UD.getNominatedNamespace()),
- getLineNumber(UD.getLocation()));
-}
-
/// 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=179839&r1=179838&r2=179839&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.h (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.h Fri Apr 19 02:46:36 2013
@@ -262,9 +262,6 @@ public:
/// EmitGlobalVariable - Emit global variable's debug info.
void EmitGlobalVariable(const ValueDecl *VD, llvm::Constant *Init);
- /// \brief - Emit C++ using directive.
- void EmitUsingDirective(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=179839&r1=179838&r2=179839&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDecl.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDecl.cpp Fri Apr 19 02:46:36 2013
@@ -80,6 +80,7 @@ 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;
@@ -89,10 +90,6 @@ void CodeGenFunction::EmitDecl(const Dec
// None of these decls require codegen support.
return;
- case Decl::UsingDirective: // using namespace X; [C++]
- if (CGDebugInfo *DI = getDebugInfo())
- DI->EmitUsingDirective(cast<UsingDirectiveDecl>(D));
- return;
case Decl::Var: {
const VarDecl &VD = cast<VarDecl>(D);
assert(VD.isLocalVarDecl() &&
Modified: cfe/trunk/test/CodeGenCXX/debug-info-namespace.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-namespace.cpp?rev=179839&r1=179838&r2=179839&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-namespace.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-namespace.cpp Fri Apr 19 02:46:36 2013
@@ -7,20 +7,11 @@ int i;
}
}
-int func() {
- using namespace A::B;
- return i;
-}
-
-// CHECK: [[MODULES:![0-9]*]], metadata !""} ; [ DW_TAG_compile_unit ]
// CHECK: [[FILE:![0-9]*]] {{.*}}debug-info-namespace.cpp"
-// CHECK: [[FUNC:![0-9]*]] {{.*}} ; [ DW_TAG_subprogram ] [line 6] [def] [func]
-// CHECK: [[FILE2:![0-9]*]]} ; [ DW_TAG_file_type ] [{{.*}}foo.cpp]
// CHECK: [[VAR:![0-9]*]] = {{.*}}, metadata [[NS:![0-9]*]], metadata !"i", {{.*}} ; [ DW_TAG_variable ] [i]
-// CHECK: [[NS]] = {{.*}}, metadata [[FILE2]], metadata [[CTXT:![0-9]*]], {{.*}} ; [ DW_TAG_namespace ] [B] [line 1]
+// CHECK: [[NS]] = {{.*}}, metadata [[FILE2:![0-9]*]], metadata [[CTXT:![0-9]*]], {{.*}} ; [ DW_TAG_namespace ] [B] [line 1]
// CHECK: [[CTXT]] = {{.*}}, metadata [[FILE]], null, {{.*}} ; [ DW_TAG_namespace ] [A] [line 3]
-// CHECK: [[MODULES]] = metadata !{metadata [[MODULE:![0-9]*]]}
-// CHECK: [[MODULE]] = metadata !{i32 {{[0-9]*}}, metadata [[FUNC]], metadata [[NS]], i32 7} ; [ DW_TAG_imported_module ]
+// CHECK: [[FILE2]]} ; [ DW_TAG_file_type ] [{{.*}}foo.cpp]
// FIXME: It is confused on win32 to generate file entry when dosish filename is given.
// REQUIRES: shell
More information about the cfe-commits
mailing list