From: David Blaikie Date: Tue, 27 May 2014 20:20:43 +0000 (+0000) Subject: DebugInfo: partially revert cleanup committed in r209680 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6900674aafbe03e7194e00bf12a5f888de03a2d5;p=platform%2Fupstream%2Fllvm.git DebugInfo: partially revert cleanup committed in r209680 I'm not sure exactly where/how we end up with an abstract DbgVariable with a null DIE, but we do... looking into it & will add a test and/or fix when I figure it out. Currently shows up in selfhost or compiler-rt builds. llvm-svn: 209683 --- diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp index 4bf0b18..a70c0f7 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -1781,7 +1781,8 @@ std::unique_ptr DwarfUnit::constructVariableDIEImpl(const DbgVariable &DV, // Define variable debug information entry. auto VariableDie = make_unique(DV.getTag()); - if (DbgVariable *AbsVar = DV.getAbstractVariable()) + DbgVariable *AbsVar = DV.getAbstractVariable(); + if (AbsVar && AbsVar->getDIE()) addDIEEntry(*VariableDie, dwarf::DW_AT_abstract_origin, *AbsVar->getDIE()); else { if (!Name.empty())