diff options
author | Devang Patel <dpatel@apple.com> | 2010-05-07 23:04:32 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-05-07 23:04:32 +0000 |
commit | 54c59312b105f9f4a738382a82279853a8e257af (patch) | |
tree | e5e16cf360de085d7d55ae7a060ed4a03cb855b5 /llvm/lib/Analysis/DebugInfo.cpp | |
parent | 32d8981ec02dca87584fb48a6804b089b971a84e (diff) | |
download | bcm5719-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.cpp | 11 |
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 { |