From 37b2017172e1f156c37bbed6f9d92d15e638bd75 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Fri, 23 Jan 2009 19:13:31 +0000 Subject: [PATCH] Empty DIType represents void. In this case no need to construct any type DIE. llvm-svn: 62861 --- lib/CodeGen/AsmPrinter/DwarfWriter.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp index fd59533eeff..6bbb5bb9b76 100644 --- a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp @@ -1662,10 +1662,8 @@ private: /// AddType - Add a new type attribute to the specified entity. void AddType(CompileUnit *DW_Unit, DIE *Entity, DIType Ty) { - if (Ty.isNull()) { - AddBasicType(Entity, DW_Unit, "", DW_ATE_signed, sizeof(int32_t)); + if (Ty.isNull()) return; - } // Check for pre-existence. DIEntry *&Slot = DW_Unit->getDIEntrySlotFor(Ty.getGV());