From 5a63474e2d4c797ca8245edae4064f17b47df3ee Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Mon, 23 Sep 2013 23:15:58 +0000 Subject: [PATCH] Add more external types to the pubtypes table. Expand the asm checking patch until we get full dumping support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191239 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 2 +- test/DebugInfo/X86/gnu-public-names.ll | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 171c13803c1..7d35937ccaf 100644 --- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -880,7 +880,7 @@ void CompileUnit::addGlobalName(StringRef Name, DIE *Die) { /// void CompileUnit::addGlobalType(DIType Ty) { DIDescriptor Context = DD->resolve(Ty.getContext()); - if (Ty.isCompositeType() && !Ty.getName().empty() && !Ty.isForwardDecl() && + if (!Ty.getName().empty() && !Ty.isForwardDecl() && (!Context || Context.isCompileUnit() || Context.isFile() || Context.isNameSpace())) if (DIEEntry *Entry = getDIEEntry(Ty)) diff --git a/test/DebugInfo/X86/gnu-public-names.ll b/test/DebugInfo/X86/gnu-public-names.ll index 54320be7e78..bca78c39f08 100644 --- a/test/DebugInfo/X86/gnu-public-names.ll +++ b/test/DebugInfo/X86/gnu-public-names.ll @@ -38,6 +38,9 @@ ; ASM: .section .debug_gnu_pubtypes ; ASM: .byte 16 # Kind: TYPE, EXTERNAL +; ASM: .asciz "C" # External Name +; ASM: .byte 144 # Kind: TYPE, STATIC +; ASM: .asciz "int" # External Name ; CHECK: .debug_info contents: ; CHECK: 0x00000046: DW_TAG_subprogram