From 5be935536f490003ecc8f93525063a859c7caf63 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Fri, 16 Jan 2009 02:15:14 +0000 Subject: [PATCH] Validate debug info values only if DwarfDebug is initialized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62298 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp index 5e98618b243..ab66887d625 100644 --- a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp @@ -4272,7 +4272,7 @@ void DwarfWriter::EndFunction(MachineFunction *MF) { /// ValidDebugInfo - Return true if V represents valid debug info value. bool DwarfWriter::ValidDebugInfo(Value *V) { - return DD->ValidDebugInfo(V); + return DD && DD->ValidDebugInfo(V); } /// RecordSourceLine - Records location information and associates it with a