Verify entire type descriptor not just tag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103303 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2010-05-07 21:45:47 +00:00
parent a6eeb6e226
commit 9c00487dc3

View File

@ -913,7 +913,7 @@ DIE *DwarfDebug::getOrCreateTypeDIE(DIType Ty) {
/// addType - Add a new type attribute to the specified entity.
void DwarfDebug::addType(DIE *Entity, DIType Ty) {
if (!Ty.isValid())
if (!Ty.Verify())
return;
// Check for pre-existence.
@ -1656,7 +1656,7 @@ void DwarfDebug::addPubTypes(DISubprogram SP) {
DIArray Args = SPTy.getTypeArray();
for (unsigned i = 0, e = Args.getNumElements(); i != e; ++i) {
DIType ATy(Args.getElement(i));
if (!ATy.isValid())
if (!ATy.Verify())
continue;
DICompositeType CATy = getDICompositeType(ATy);
if (DIDescriptor(CATy).Verify() && !CATy.getName().empty()