Debug Info: clean up usage of Verify.
No functionality change. It should suffice to check the type of a debug info
metadata, instead of calling Verify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185847 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index ea11bc0..ec7c5bf 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -241,7 +241,7 @@
/// entry.
void CompileUnit::addSourceLine(DIE *Die, DIVariable V) {
// Verify variable.
- if (!V.Verify())
+ if (!V.isVariable())
return;
unsigned Line = V.getLineNumber();
@@ -259,7 +259,7 @@
/// entry.
void CompileUnit::addSourceLine(DIE *Die, DIGlobalVariable G) {
// Verify global variable.
- if (!G.Verify())
+ if (!G.isGlobalVariable())
return;
unsigned Line = G.getLineNumber();
@@ -276,7 +276,7 @@
/// entry.
void CompileUnit::addSourceLine(DIE *Die, DISubprogram SP) {
// Verify subprogram.
- if (!SP.Verify())
+ if (!SP.isSubprogram())
return;
// If the line number is 0, don't add it.
@@ -295,7 +295,7 @@
/// entry.
void CompileUnit::addSourceLine(DIE *Die, DIType Ty) {
// Verify type.
- if (!Ty.Verify())
+ if (!Ty.isType())
return;
unsigned Line = Ty.getLineNumber();
@@ -312,7 +312,7 @@
/// entry.
void CompileUnit::addSourceLine(DIE *Die, DIObjCProperty Ty) {
// Verify type.
- if (!Ty.Verify())
+ if (!Ty.isObjCProperty())
return;
unsigned Line = Ty.getLineNumber();
@@ -734,7 +734,7 @@
/// given DIType.
DIE *CompileUnit::getOrCreateTypeDIE(const MDNode *TyNode) {
DIType Ty(TyNode);
- if (!Ty.Verify())
+ if (!Ty.isType())
return NULL;
DIE *TyDIE = getDIE(Ty);
if (TyDIE)
@@ -773,7 +773,7 @@
/// addType - Add a new type attribute to the specified entity.
void CompileUnit::addType(DIE *Entity, DIType Ty, unsigned Attribute) {
- if (!Ty.Verify())
+ if (!Ty.isType())
return;
// Check for pre-existence.
@@ -818,7 +818,7 @@
DIArray Args = SPTy.getTypeArray();
for (unsigned i = 0, e = Args.getNumElements(); i != e; ++i) {
DIType ATy(Args.getElement(i));
- if (!ATy.Verify())
+ if (!ATy.isType())
continue;
addGlobalType(ATy);
}
@@ -904,7 +904,7 @@
}
}
DIType DTy = CTy.getTypeDerivedFrom();
- if (DTy.Verify()) {
+ if (DTy.isType()) {
addType(&Buffer, DTy);
addUInt(&Buffer, dwarf::DW_AT_enum_class, dwarf::DW_FORM_flag, 1);
}
@@ -1296,7 +1296,7 @@
return;
DIGlobalVariable GV(N);
- if (!GV.Verify())
+ if (!GV.isGlobalVariable())
return;
DIDescriptor GVContext = GV.getContext();