diff options
author | Devang Patel <dpatel@apple.com> | 2010-04-13 20:35:04 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-04-13 20:35:04 +0000 |
commit | 12d150ea430248174e624815865565703be89e3c (patch) | |
tree | 60ae09e17bde3978386bf31e4d8190c5b5fdb890 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | cce672c1720d7760181f970663bcb0c00a9a7b89 (diff) | |
download | bcm5719-llvm-12d150ea430248174e624815865565703be89e3c.tar.gz bcm5719-llvm-12d150ea430248174e624815865565703be89e3c.zip |
Do not include types without any definition in pubtypes list.
llvm-svn: 101171
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 7fed0c5162e..06e7cc40331 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1612,7 +1612,8 @@ void DwarfDebug::addPubTypes(DISubprogram SP) { if (!ATy.isValid()) continue; DICompositeType CATy = getDICompositeType(ATy); - if (DIDescriptor(CATy.getNode()).Verify() && !CATy.getName().empty()) { + if (DIDescriptor(CATy.getNode()).Verify() && !CATy.getName().empty() + && !CATy.isForwardDecl()) { if (DIEEntry *Entry = ModuleCU->getDIEEntry(CATy.getNode())) ModuleCU->addGlobalType(CATy.getName(), Entry->getEntry()); } @@ -1804,7 +1805,8 @@ void DwarfDebug::constructGlobalVariableDIE(MDNode *N) { ModuleCU->addGlobal(DI_GV.getName(), VariableDie); DIType GTy = DI_GV.getType(); - if (GTy.isCompositeType() && !GTy.getName().empty()) { + if (GTy.isCompositeType() && !GTy.getName().empty() + && !GTy.isForwardDecl()) { DIEEntry *Entry = ModuleCU->getDIEEntry(GTy.getNode()); assert(Entry && "Missing global type!"); ModuleCU->addGlobalType(GTy.getName(), Entry->getEntry()); |