Verify entire type descriptor not just tag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103303 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index f9c11d5..9e5472b 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -913,7 +913,7 @@
/// 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 @@
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()