OSDN Git Service

Work around for some problems with templates.
authorJim Laskey <jlaskey@mac.com>
Wed, 4 Oct 2006 01:43:13 +0000 (01:43 +0000)
committerJim Laskey <jlaskey@mac.com>
Wed, 4 Oct 2006 01:43:13 +0000 (01:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30715 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/DwarfWriter.cpp

index 0921cc5..32079f2 100644 (file)
@@ -1526,6 +1526,12 @@ DIE *DwarfWriter::NewType(DIE *Context, TypeDesc *TyDesc, CompileUnit *Unit) {
     }
     default: break;
     }
+  } else if (SubprogramDesc *SubprogramTy = dyn_cast<SubprogramDesc>(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");