From ef2ae740c6d82e3d310064a17e884dec024c55a8 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Tue, 25 Sep 2018 17:29:30 +0000 Subject: Revert "[DebugInfo] Do not generate address info for removed debug labels." The added test is failing on macOS: http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/53550/ This reverts r342943. llvm-svn: 342993 --- llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter') diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 496c80a08e3..ee6821907b6 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -865,9 +865,10 @@ void DwarfCompileUnit::finishEntityDefinition(const DbgEntity *Entity) { llvm_unreachable("DbgEntity must be DbgVariable or DbgLabel."); } - if (Label) - if (const auto *Sym = Label->getSymbol()) - addLabelAddress(*Die, dwarf::DW_AT_low_pc, Sym); + if (Label) { + const MCSymbol *Sym = Label->getSymbol(); + addLabelAddress(*Die, dwarf::DW_AT_low_pc, Sym); + } } DbgEntity *DwarfCompileUnit::getExistingAbstractEntity(const DINode *Node) { -- cgit v1.2.3