summaryrefslogtreecommitdiff
path: root/lib/Analysis/DebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-11-06 17:58:12 +0000
committerDevang Patel <dpatel@apple.com>2009-11-06 17:58:12 +0000
commit84c73e9b8234287c4521e6d7e27c15e77843489e (patch)
treeb1d049744293905389d9485b36cc83844deec266 /lib/Analysis/DebugInfo.cpp
parent2928c83b010f7cfdb0f819199d806f6942a7d995 (diff)
downloadllvm-84c73e9b8234287c4521e6d7e27c15e77843489e.tar.gz
llvm-84c73e9b8234287c4521e6d7e27c15e77843489e.tar.bz2
llvm-84c73e9b8234287c4521e6d7e27c15e77843489e.tar.xz
Do not bother to emit debug info for nameless global variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86259 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DebugInfo.cpp')
-rw-r--r--lib/Analysis/DebugInfo.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index b64dbf433a..7c1cc35ee9 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -366,6 +366,9 @@ bool DIGlobalVariable::Verify() const {
if (isNull())
return false;
+ if (!getDisplayName())
+ return false;
+
if (getContext().isNull())
return false;