Changes in directory llvm/lib/CodeGen:
DwarfWriter.cpp updated: 1.78 -> 1.79 --- Log message: Workaround for templates --- Diffs of the changes: (+10 -0) DwarfWriter.cpp | 10 ++++++++++ 1 files changed, 10 insertions(+) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.78 llvm/lib/CodeGen/DwarfWriter.cpp:1.79 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.78 Wed Oct 4 05:40:15 2006 +++ llvm/lib/CodeGen/DwarfWriter.cpp Fri Oct 13 08:02:19 2006 @@ -1267,6 +1267,7 @@ // Type DIE result. DIE *Ty = NULL; + // FIXME - Not sure why programs and variables are coming through here. // Short cut for handling subprogram types (not really a TyDesc.) if (SubprogramDesc *SubprogramTy = dyn_cast<SubprogramDesc>(TyDesc)) { Slot = Ty = new DIE(DW_TAG_pointer_type); @@ -1275,6 +1276,15 @@ Context->AddChild(Ty); return Slot; } + // Short cut for handling global variable types (not really a TyDesc.) + if (GlobalVariableDesc *GlobalVariableTy = + dyn_cast<GlobalVariableDesc>(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, GlobalVariableTy->getName()); + Context->AddChild(Ty); + return Slot; + } // Get core information. const std::string &Name = TyDesc->getName(); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits