summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
index 1d63e33a4d3..826162ad47c 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
@@ -129,10 +129,9 @@ bool hasDebugInfo(const MachineModuleInfo *MMI, const MachineFunction *MF) {
}
void DebugHandlerBase::beginFunction(const MachineFunction *MF) {
- assert(Asm);
PrevInstBB = nullptr;
- if (!hasDebugInfo(MMI, MF)) {
+ if (!Asm || !hasDebugInfo(MMI, MF)) {
skippedNonDebugFunction();
return;
}
OpenPOWER on IntegriCloud