From: Devang Patel Date: Fri, 16 Jan 2009 01:49:46 +0000 (+0000) Subject: Any debug info symbol is only valid if atleast one compile unit is seen. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=61c6bf37ef7d6066d12efa40639d67e7caf14b2d;p=oota-llvm.git Any debug info symbol is only valid if atleast one compile unit is seen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62294 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp index 4f115b1204f..5e98618b243 100644 --- a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp @@ -3083,6 +3083,10 @@ public: /// ValidDebugInfo - Return true if V represents valid debug info value. bool ValidDebugInfo(Value *V) { + + if (!shouldEmit) + return false; + GlobalVariable *GV = getGlobalVariable(V); if (!GV) return false;