summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-01-16 01:49:46 +0000
committerDevang Patel <dpatel@apple.com>2009-01-16 01:49:46 +0000
commit32fed1c0ef6d3ada88069639995e3fa4548b70f4 (patch)
tree86c33db4e9b89984274f140d86a2702af99f8ea9 /llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
parentdae927609046e7b2c8f81e8c5e641f7dabeb3af4 (diff)
downloadbcm5719-llvm-32fed1c0ef6d3ada88069639995e3fa4548b70f4.tar.gz
bcm5719-llvm-32fed1c0ef6d3ada88069639995e3fa4548b70f4.zip
Any debug info symbol is only valid if atleast one compile unit is seen.
llvm-svn: 62294
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
index 4f115b1204f..5e98618b243 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud