summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-05-31 22:56:51 +0000
committerDevang Patel <dpatel@apple.com>2011-05-31 22:56:51 +0000
commite9ae06ca987b6c3b6cfbcd50ab85386565a4e0ca (patch)
tree303a1f3d2a27d5e97976df3ca914edaee0b56360 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent7d866044f4a6c32af1bba2d31a7c8c09b6f7fb6e (diff)
downloadllvm-e9ae06ca987b6c3b6cfbcd50ab85386565a4e0ca.tar.gz
llvm-e9ae06ca987b6c3b6cfbcd50ab85386565a4e0ca.tar.bz2
llvm-e9ae06ca987b6c3b6cfbcd50ab85386565a4e0ca.tar.xz
Include global types, that are referenced through local variables, in debug_pubtypes list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132371 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index f29b1996cc..3c42f2de44 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -985,12 +985,7 @@ void DwarfDebug::constructGlobalVariableDIE(const MDNode *N) {
getRealLinkageName(LinkageName));
// Add type.
TheCU->addType(VariableDIE, GTy);
- if (GTy.isCompositeType() && !GTy.getName().empty()
- && !GTy.isForwardDecl()) {
- DIEEntry *Entry = TheCU->getDIEEntry(GTy);
- assert(Entry && "Missing global type!");
- TheCU->addGlobalType(GTy.getName(), Entry->getEntry());
- }
+
// Add scoping info.
if (!GV.isLocalToUnit()) {
TheCU->addUInt(VariableDIE, dwarf::DW_AT_external, dwarf::DW_FORM_flag, 1);