aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
diff options
context:
space:
mode:
authorJameson Nash <vtjnash@gmail.com>2020-10-16 17:22:07 -0400
committerJameson Nash <vtjnash@gmail.com>2020-10-16 17:22:07 -0400
commit4242df14708cb84b3732ba1a22fb77146833340b (patch)
tree634c6f0e10ea3621bb7df6be6cdad0834f02b231 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
parent24b5266892c30e2c9cb6ea28c2631e988a5754b6 (diff)
downloadllvm-4242df14708cb84b3732ba1a22fb77146833340b.zip
llvm-4242df14708cb84b3732ba1a22fb77146833340b.tar.gz
llvm-4242df14708cb84b3732ba1a22fb77146833340b.tar.bz2
Revert "make the AsmPrinterHandler array public"
I messed up one of the tests.
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp3
1 files changed, 3 insertions, 0 deletions
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