From 0bc7690e34b23c9e254bfe1419e8456bea94ba60 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Thu, 5 Jun 2014 02:04:59 +0000 Subject: [PATCH] Revert r210221 again, due to a crash Richard Smith has provided involving self-hosting LLVM with libc++. Test case coming, once I reduce it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210236 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfUnit.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfUnit.cpp index af9344a4245..49864ea1f3b 100644 --- a/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -1784,8 +1784,7 @@ std::unique_ptr DwarfUnit::constructVariableDIEImpl(const DbgVariable &DV, // Define variable debug information entry. auto VariableDie = make_unique(DV.getTag()); DbgVariable *AbsVar = DV.getAbstractVariable(); - if (AbsVar) { - assert(AbsVar->getDIE()); + if (AbsVar && AbsVar->getDIE()) { addDIEEntry(*VariableDie, dwarf::DW_AT_abstract_origin, *AbsVar->getDIE()); } else { if (!Name.empty()) -- 2.34.1