From: Eric Christopher Date: Tue, 24 Sep 2013 00:17:57 +0000 (+0000) Subject: Add namespaces to the list of items that we expose via pubnames. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3d2c90f6dd7bc86a320b96bace7ad3fda631bf17;p=oota-llvm.git Add namespaces to the list of items that we expose via pubnames. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191257 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 7d35937ccaf..d3d8251bb2f 100644 --- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -1258,6 +1258,7 @@ DIE *CompileUnit::getOrCreateNameSpace(DINameSpace NS) { if (!NS.getName().empty()) { addString(NDie, dwarf::DW_AT_name, NS.getName()); addAccelNamespace(NS.getName(), NDie); + addGlobalName(NS.getName(), NDie); } else addAccelNamespace("(anonymous namespace)", NDie); addSourceLine(NDie, NS); diff --git a/test/DebugInfo/X86/gnu-public-names.ll b/test/DebugInfo/X86/gnu-public-names.ll index fec5ef18067..986f41cfa5a 100644 --- a/test/DebugInfo/X86/gnu-public-names.ll +++ b/test/DebugInfo/X86/gnu-public-names.ll @@ -70,6 +70,7 @@ ; CHECK-NEXT: Offset in .debug_info: 0 ; CHECK-NEXT: Size: 319 ; CHECK-NEXT: Offset Linkage Kind Name +; CHECK-DAG: 0x00000091 EXTERNAL TYPE "ns" ; CHECK-DAG: 0x00000098 EXTERNAL VARIABLE "global_namespace_variable" ; CHECK-DAG: 0x000000a7 EXTERNAL FUNCTION "global_namespace_function" ; CHECK-DAG: 0x000000ea STATIC FUNCTION "static_member_function"