Add DINameSpace::Verify().

llvm-svn: 103318
This commit is contained in:
Devang Patel 2010-05-07 23:04:32 +00:00
parent 32d8981ec0
commit 54c59312b1
2 changed files with 12 additions and 0 deletions

View File

@ -541,6 +541,7 @@ namespace llvm {
return F.getCompileUnit();
}
unsigned getLineNumber() const { return getUnsignedField(4); }
bool Verify() const;
};
/// DILocation - This object holds location information. This object

View File

@ -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 {