From b2dbdc5a38f826eaeb37c16b84306f47ac34ce94 Mon Sep 17 00:00:00 2001 From: Jim Laskey Date: Wed, 4 Oct 2006 01:43:13 +0000 Subject: [PATCH] Work around for some problems with templates. llvm-svn: 30715 --- lib/CodeGen/DwarfWriter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp index 0921cc5c647..32079f22006 100644 --- a/lib/CodeGen/DwarfWriter.cpp +++ b/lib/CodeGen/DwarfWriter.cpp @@ -1526,6 +1526,12 @@ DIE *DwarfWriter::NewType(DIE *Context, TypeDesc *TyDesc, CompileUnit *Unit) { } default: break; } + } else if (SubprogramDesc *SubprogramTy = dyn_cast(TyDesc)) { + Slot = Ty = new DIE(DW_TAG_pointer_type); + Ty->AddUInt(DW_AT_byte_size, 0, TAI->getAddressSize()); + Ty->AddString(DW_AT_name, DW_FORM_string, SubprogramTy->getName()); + Context->AddChild(Ty); + return Slot; } assert(Ty && "Type not supported yet");