[llvm] r209683 - DebugInfo: partially revert cleanup committed in r209680
David Blaikie
dblaikie at gmail.com
Tue May 27 13:20:44 PDT 2014
Author: dblaikie
Date: Tue May 27 15:20:43 2014
New Revision: 209683
URL: http://llvm.org/viewvc/llvm-project?rev=209683&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=209683&r1=209682&r2=209683&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Tue May 27 15:20:43 2014
@@ -1781,7 +1781,8 @@ std::unique_ptr<DIE> DwarfUnit::construc
// Define variable debug information entry.
auto VariableDie = make_unique<DIE>(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())
More information about the llvm-commits
mailing list