[llvm-commits] [llvm] r103318 - in /llvm/trunk: include/llvm/Analysis/DebugInfo.h lib/Analysis/DebugInfo.cpp
Devang Patel
dpatel at apple.com
Fri May 7 16:04:32 PDT 2010
Author: dpatel
Date: Fri May 7 18:04:32 2010
New Revision: 103318
URL: http://llvm.org/viewvc/llvm-project?rev=103318&view=rev
Log:
Add DINameSpace::Verify().
Modified:
llvm/trunk/include/llvm/Analysis/DebugInfo.h
llvm/trunk/lib/Analysis/DebugInfo.cpp
Modified: llvm/trunk/include/llvm/Analysis/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DebugInfo.h?rev=103318&r1=103317&r2=103318&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/DebugInfo.h Fri May 7 18:04:32 2010
@@ -541,6 +541,7 @@
return F.getCompileUnit();
}
unsigned getLineNumber() const { return getUnsignedField(4); }
+ bool Verify() const;
};
/// DILocation - This object holds location information. This object
Modified: llvm/trunk/lib/Analysis/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DebugInfo.cpp?rev=103318&r1=103317&r2=103318&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/DebugInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/DebugInfo.cpp Fri May 7 18:04:32 2010
@@ -350,6 +350,17 @@
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 {
More information about the llvm-commits
mailing list