aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-05-07 23:04:32 +0000
committerDevang Patel <dpatel@apple.com>2010-05-07 23:04:32 +0000
commit47e2265a30d0a990839f81315ce6387c09d2c36b (patch)
tree3e4b8471854980c101915c24eff29323200a2266 /lib/Analysis/DebugInfo.cpp
parent20eb256006379abfcb32d6e0436fda7c425cd22f (diff)
Add DINameSpace::Verify().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103318 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DebugInfo.cpp')
-rw-r--r--lib/Analysis/DebugInfo.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index 56c9b21022..7bbae59b87 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -350,6 +350,17 @@ bool DILocation::Verify() const {
return DbgNode->getNumOperands() == 4;
}
+/// Verify - Verify that a namespace descriptor is well formed.
+bool DINameSpace::Verify() const {
+ if (!DbgNode)
+ return false;
+ if (getName().empty())
+ return false;
+ if (!getCompileUnit().Verify())
+ return false;
+ return true;
+}
+
/// getOriginalTypeSize - If this type is derived from a base type then
/// return base type size.
uint64_t DIDerivedType::getOriginalTypeSize() const {