summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit54c59312b105f9f4a738382a82279853a8e257af (patch)
treee5e16cf360de085d7d55ae7a060ed4a03cb855b5 /llvm/lib/Analysis/DebugInfo.cpp
parent32d8981ec02dca87584fb48a6804b089b971a84e (diff)
downloadbcm5719-llvm-54c59312b105f9f4a738382a82279853a8e257af.tar.gz
bcm5719-llvm-54c59312b105f9f4a738382a82279853a8e257af.zip
Add DINameSpace::Verify().
llvm-svn: 103318
Diffstat (limited to 'llvm/lib/Analysis/DebugInfo.cpp')
-rw-r--r--llvm/lib/Analysis/DebugInfo.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp
index 56c9b210222..7bbae59b87a 100644
--- a/llvm/lib/Analysis/DebugInfo.cpp
+++ b/llvm/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 {
OpenPOWER on IntegriCloud