/// Verify - Verify that a subprogram descriptor is well formed. bool DISubprogram::Verify() const { if (!DbgNode) return false; if (getContext() && !getContext().Verify()) return false; DICompositeType Ty = getType(); if (!Ty.Verify()) return false; return true; }
/// Verify - Verify that a subprogram descriptor is well formed. bool DISubprogram::Verify() const { if (!isSubprogram()) return false; if (getContext() && !getContext().Verify()) return false; DICompositeType Ty = getType(); if (!Ty.Verify()) return false; return DbgNode->getNumOperands() == 20; }
/// Verify - Verify that a subprogram descriptor is well formed. bool DISubprogram::Verify() const { if (isNull()) return false; if (getContext().isNull()) return false; DICompileUnit CU = getCompileUnit(); if (!CU.Verify()) return false; DICompositeType Ty = getType(); if (!Ty.isNull() && !Ty.Verify()) return false; return true; }
/// print - Print type. void DIType::print(raw_ostream &OS) const { if (!DbgNode) return; StringRef Res = getName(); if (!Res.empty()) OS << " [" << Res << "] "; unsigned Tag = getTag(); OS << " [" << dwarf::TagString(Tag) << "] "; // TODO : Print context OS << " [" << "line " << getLineNumber() << ", " << getSizeInBits() << " bits, " << getAlignInBits() << " bit alignment, " << getOffsetInBits() << " bit offset" << "] "; if (isPrivate()) OS << " [private] "; else if (isProtected()) OS << " [protected] "; if (isForwardDecl()) OS << " [fwd] "; if (isBasicType()) DIBasicType(DbgNode).print(OS); else if (isDerivedType()) { DIDerivedType DTy = DIDerivedType(DbgNode); DTy.print(OS); DICompositeType CTy = getDICompositeType(DTy); if (CTy.Verify()) CTy.print(OS); } else if (isCompositeType()) DICompositeType(DbgNode).print(OS); else { OS << "Invalid DIType\n"; return; } OS << "\n"; }