From 4242df14708cb84b3732ba1a22fb77146833340b Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 16 Oct 2020 17:22:07 -0400 Subject: Revert "make the AsmPrinterHandler array public" I messed up one of the tests. --- llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index a24deb5..bcace62 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -141,6 +141,7 @@ CodeViewDebug::CodeViewDebug(AsmPrinter *AP) if (!MMI->getModule()->getNamedMetadata("llvm.dbg.cu") || !AP->getObjFileLowering().getCOFFDebugSymbolsSection()) { Asm = nullptr; + MMI->setDebugInfoAvailability(false); return; } // Tell MMI that we have debug info. @@ -563,6 +564,8 @@ void CodeViewDebug::endModule() { if (!Asm || !MMI->hasDebugInfo()) return; + assert(Asm != nullptr); + // The COFF .debug$S section consists of several subsections, each starting // with a 4-byte control code (e.g. 0xF1, 0xF2, etc) and then a 4-byte length // of the payload followed by the payload itself. The subsections are 4-byte -- cgit v1.1