Lines Matching refs:CheckDI
668 #define CheckDI(C, ...) \ macro
679 CheckDI(I.DebugMarker->MarkedInstr == &I, in visitDbgRecords()
681 CheckDI(!isa<PHINode>(&I) || !I.hasDbgRecords(), in visitDbgRecords()
684 CheckDI(DR.getMarker() == I.DebugMarker, in visitDbgRecords()
900 CheckDI(false, "!dbg attachment of global variable must be a " in visitGlobalVariable()
1019 CheckDI(NMD.getName() == "llvm.dbg.cu", in visitNamedMDNode()
1023 CheckDI(MD && isa<DICompileUnit>(MD), "invalid compile unit", &NMD, MD); in visitNamedMDNode()
1058 CheckDI(!isa<DILocation>(Op) || AllowLocs == AreDebugLocsAllowed::Yes, in visitMDNode()
1130 CheckDI(N.getRawScope() && isa<DILocalScope>(N.getRawScope()), in visitDILocation()
1133 CheckDI(isa<DILocation>(IA), "inlined-at should be a location", &N, IA); in visitDILocation()
1135 CheckDI(SP->isDefinition(), "scope points into the type hierarchy", &N); in visitDILocation()
1139 CheckDI(N.getTag(), "invalid tag", &N); in visitGenericDINode()
1144 CheckDI(isa<DIFile>(F), "invalid file", &N, F); in visitDIScope()
1148 CheckDI(N.getTag() == dwarf::DW_TAG_subrange_type, "invalid tag", &N); in visitDISubrange()
1149 CheckDI(!N.getRawCountNode() || !N.getRawUpperBound(), in visitDISubrange()
1152 CheckDI(!CBound || isa<ConstantAsMetadata>(CBound) || in visitDISubrange()
1156 CheckDI(!Count || !isa<ConstantInt *>(Count) || in visitDISubrange()
1160 CheckDI(!LBound || isa<ConstantAsMetadata>(LBound) || in visitDISubrange()
1165 CheckDI(!UBound || isa<ConstantAsMetadata>(UBound) || in visitDISubrange()
1170 CheckDI(!Stride || isa<ConstantAsMetadata>(Stride) || in visitDISubrange()
1176 CheckDI(N.getTag() == dwarf::DW_TAG_generic_subrange, "invalid tag", &N); in visitDIGenericSubrange()
1177 CheckDI(!N.getRawCountNode() || !N.getRawUpperBound(), in visitDIGenericSubrange()
1180 CheckDI(!CBound || isa<DIVariable>(CBound) || isa<DIExpression>(CBound), in visitDIGenericSubrange()
1183 CheckDI(LBound, "GenericSubrange must contain lowerBound", &N); in visitDIGenericSubrange()
1184 CheckDI(isa<DIVariable>(LBound) || isa<DIExpression>(LBound), in visitDIGenericSubrange()
1188 CheckDI(!UBound || isa<DIVariable>(UBound) || isa<DIExpression>(UBound), in visitDIGenericSubrange()
1192 CheckDI(Stride, "GenericSubrange must contain stride", &N); in visitDIGenericSubrange()
1193 CheckDI(isa<DIVariable>(Stride) || isa<DIExpression>(Stride), in visitDIGenericSubrange()
1198 CheckDI(N.getTag() == dwarf::DW_TAG_enumerator, "invalid tag", &N); in visitDIEnumerator()
1202 CheckDI(N.getTag() == dwarf::DW_TAG_base_type || in visitDIBasicType()
1209 CheckDI(N.getTag() == dwarf::DW_TAG_string_type, "invalid tag", &N); in visitDIStringType()
1210 CheckDI(!(N.isBigEndian() && N.isLittleEndian()), "has conflicting flags", in visitDIStringType()
1218 CheckDI(N.getTag() == dwarf::DW_TAG_typedef || in visitDIDerivedType()
1237 CheckDI(isType(N.getRawExtraData()), "invalid pointer to member type", &N, in visitDIDerivedType()
1245 CheckDI( in visitDIDerivedType()
1256 CheckDI(isScope(N.getRawScope()), "invalid scope", &N, N.getRawScope()); in visitDIDerivedType()
1257 CheckDI(isType(N.getRawBaseType()), "invalid base type", &N, in visitDIDerivedType()
1261 CheckDI(N.getTag() == dwarf::DW_TAG_pointer_type || in visitDIDerivedType()
1279 CheckDI(Params, "invalid template params", &N, &RawParams); in visitTemplateParams()
1281 CheckDI(Op && isa<DITemplateParameter>(Op), "invalid template parameter", in visitTemplateParams()
1290 CheckDI(N.getTag() == dwarf::DW_TAG_array_type || in visitDICompositeType()
1299 CheckDI(isScope(N.getRawScope()), "invalid scope", &N, N.getRawScope()); in visitDICompositeType()
1300 CheckDI(isType(N.getRawBaseType()), "invalid base type", &N, in visitDICompositeType()
1303 CheckDI(!N.getRawElements() || isa<MDTuple>(N.getRawElements()), in visitDICompositeType()
1305 CheckDI(isType(N.getRawVTableHolder()), "invalid vtable holder", &N, in visitDICompositeType()
1307 CheckDI(!hasConflictingReferenceFlags(N.getFlags()), in visitDICompositeType()
1310 CheckDI((N.getFlags() & DIBlockByRefStruct) == 0, in visitDICompositeType()
1315 CheckDI(Elements.size() == 1 && in visitDICompositeType()
1324 CheckDI(isa<DIDerivedType>(D) && N.getTag() == dwarf::DW_TAG_variant_part, in visitDICompositeType()
1329 CheckDI(N.getTag() == dwarf::DW_TAG_array_type, in visitDICompositeType()
1334 CheckDI(N.getTag() == dwarf::DW_TAG_array_type, in visitDICompositeType()
1339 CheckDI(N.getTag() == dwarf::DW_TAG_array_type, in visitDICompositeType()
1344 CheckDI(N.getTag() == dwarf::DW_TAG_array_type, in visitDICompositeType()
1349 CheckDI(N.getRawBaseType(), "array types must have a base type", &N); in visitDICompositeType()
1354 CheckDI(N.getTag() == dwarf::DW_TAG_subroutine_type, "invalid tag", &N); in visitDISubroutineType()
1356 CheckDI(isa<MDTuple>(Types), "invalid composite elements", &N, Types); in visitDISubroutineType()
1358 CheckDI(isType(Ty), "invalid subroutine type ref", &N, Types, Ty); in visitDISubroutineType()
1361 CheckDI(!hasConflictingReferenceFlags(N.getFlags()), in visitDISubroutineType()
1366 CheckDI(N.getTag() == dwarf::DW_TAG_file_type, "invalid tag", &N); in visitDIFile()
1369 CheckDI(Checksum->Kind <= DIFile::ChecksumKind::CSK_Last, in visitDIFile()
1383 CheckDI(Checksum->Value.size() == Size, "invalid checksum length", &N); in visitDIFile()
1384 CheckDI(Checksum->Value.find_if_not(llvm::isHexDigit) == StringRef::npos, in visitDIFile()
1390 CheckDI(N.isDistinct(), "compile units must be distinct", &N); in visitDICompileUnit()
1391 CheckDI(N.getTag() == dwarf::DW_TAG_compile_unit, "invalid tag", &N); in visitDICompileUnit()
1395 CheckDI(N.getRawFile() && isa<DIFile>(N.getRawFile()), "invalid file", &N, in visitDICompileUnit()
1397 CheckDI(!N.getFile()->getFilename().empty(), "invalid filename", &N, in visitDICompileUnit()
1400 CheckDI((N.getEmissionKind() <= DICompileUnit::LastEmissionKind), in visitDICompileUnit()
1404 CheckDI(isa<MDTuple>(Array), "invalid enum list", &N, Array); in visitDICompileUnit()
1407 CheckDI(Enum && Enum->getTag() == dwarf::DW_TAG_enumeration_type, in visitDICompileUnit()
1412 CheckDI(isa<MDTuple>(Array), "invalid retained type list", &N, Array); in visitDICompileUnit()
1414 CheckDI( in visitDICompileUnit()
1421 CheckDI(isa<MDTuple>(Array), "invalid global variable list", &N, Array); in visitDICompileUnit()
1423 CheckDI(Op && (isa<DIGlobalVariableExpression>(Op)), in visitDICompileUnit()
1428 CheckDI(isa<MDTuple>(Array), "invalid imported entity list", &N, Array); in visitDICompileUnit()
1430 CheckDI(Op && isa<DIImportedEntity>(Op), "invalid imported entity ref", in visitDICompileUnit()
1435 CheckDI(isa<MDTuple>(Array), "invalid macro list", &N, Array); in visitDICompileUnit()
1437 CheckDI(Op && isa<DIMacroNode>(Op), "invalid macro ref", &N, Op); in visitDICompileUnit()
1444 CheckDI(N.getTag() == dwarf::DW_TAG_subprogram, "invalid tag", &N); in visitDISubprogram()
1445 CheckDI(isScope(N.getRawScope()), "invalid scope", &N, N.getRawScope()); in visitDISubprogram()
1447 CheckDI(isa<DIFile>(F), "invalid file", &N, F); in visitDISubprogram()
1449 CheckDI(N.getLine() == 0, "line specified with no file", &N, N.getLine()); in visitDISubprogram()
1451 CheckDI(isa<DISubroutineType>(T), "invalid subroutine type", &N, T); in visitDISubprogram()
1452 CheckDI(isType(N.getRawContainingType()), "invalid containing type", &N, in visitDISubprogram()
1457 CheckDI(isa<DISubprogram>(S) && !cast<DISubprogram>(S)->isDefinition(), in visitDISubprogram()
1461 CheckDI(Node, "invalid retained nodes list", &N, RawNode); in visitDISubprogram()
1463 CheckDI(Op && (isa<DILocalVariable>(Op) || isa<DILabel>(Op) || in visitDISubprogram()
1470 CheckDI(!hasConflictingReferenceFlags(N.getFlags()), in visitDISubprogram()
1476 CheckDI(N.isDistinct(), "subprogram definitions must be distinct", &N); in visitDISubprogram()
1477 CheckDI(Unit, "subprogram definitions must have a compile unit", &N); in visitDISubprogram()
1478 CheckDI(isa<DICompileUnit>(Unit), "invalid unit type", &N, Unit); in visitDISubprogram()
1484 CheckDI(N.getDeclaration(), in visitDISubprogram()
1490 CheckDI(!Unit, "subprogram declarations must not have a compile unit", &N); in visitDISubprogram()
1491 CheckDI(!N.getRawDeclaration(), in visitDISubprogram()
1497 CheckDI(ThrownTypes, "invalid thrown types list", &N, RawThrownTypes); in visitDISubprogram()
1499 CheckDI(Op && isa<DIType>(Op), "invalid thrown type", &N, ThrownTypes, in visitDISubprogram()
1504 CheckDI(N.isDefinition(), in visitDISubprogram()
1509 CheckDI(N.getTag() == dwarf::DW_TAG_lexical_block, "invalid tag", &N); in visitDILexicalBlockBase()
1510 CheckDI(N.getRawScope() && isa<DILocalScope>(N.getRawScope()), in visitDILexicalBlockBase()
1513 CheckDI(SP->isDefinition(), "scope points into the type hierarchy", &N); in visitDILexicalBlockBase()
1519 CheckDI(N.getLine() || !N.getColumn(), in visitDILexicalBlock()
1528 CheckDI(N.getTag() == dwarf::DW_TAG_common_block, "invalid tag", &N); in visitDICommonBlock()
1530 CheckDI(isa<DIScope>(S), "invalid scope ref", &N, S); in visitDICommonBlock()
1532 CheckDI(isa<DIGlobalVariable>(S), "invalid declaration", &N, S); in visitDICommonBlock()
1536 CheckDI(N.getTag() == dwarf::DW_TAG_namespace, "invalid tag", &N); in visitDINamespace()
1538 CheckDI(isa<DIScope>(S), "invalid scope ref", &N, S); in visitDINamespace()
1542 CheckDI(N.getMacinfoType() == dwarf::DW_MACINFO_define || in visitDIMacro()
1545 CheckDI(!N.getName().empty(), "anonymous macro", &N); in visitDIMacro()
1552 CheckDI(N.getMacinfoType() == dwarf::DW_MACINFO_start_file, in visitDIMacroFile()
1555 CheckDI(isa<DIFile>(F), "invalid file", &N, F); in visitDIMacroFile()
1558 CheckDI(isa<MDTuple>(Array), "invalid macro list", &N, Array); in visitDIMacroFile()
1560 CheckDI(Op && isa<DIMacroNode>(Op), "invalid macro ref", &N, Op); in visitDIMacroFile()
1566 CheckDI(N.getTag() == dwarf::DW_TAG_module, "invalid tag", &N); in visitDIModule()
1567 CheckDI(!N.getName().empty(), "anonymous module", &N); in visitDIModule()
1571 CheckDI(isType(N.getRawType()), "invalid type ref", &N, N.getRawType()); in visitDITemplateParameter()
1577 CheckDI(N.getTag() == dwarf::DW_TAG_template_type_parameter, "invalid tag", in visitDITemplateTypeParameter()
1585 CheckDI(N.getTag() == dwarf::DW_TAG_template_value_parameter || in visitDITemplateValueParameter()
1593 CheckDI(isa<DIScope>(S), "invalid scope", &N, S); in visitDIVariable()
1595 CheckDI(isa<DIFile>(F), "invalid file", &N, F); in visitDIVariable()
1602 CheckDI(N.getTag() == dwarf::DW_TAG_variable, "invalid tag", &N); in visitDIGlobalVariable()
1603 CheckDI(isType(N.getRawType()), "invalid type ref", &N, N.getRawType()); in visitDIGlobalVariable()
1606 CheckDI(N.getType(), "missing global variable type", &N); in visitDIGlobalVariable()
1608 CheckDI(isa<DIDerivedType>(Member), in visitDIGlobalVariable()
1617 CheckDI(isType(N.getRawType()), "invalid type ref", &N, N.getRawType()); in visitDILocalVariable()
1618 CheckDI(N.getTag() == dwarf::DW_TAG_variable, "invalid tag", &N); in visitDILocalVariable()
1619 CheckDI(N.getRawScope() && isa<DILocalScope>(N.getRawScope()), in visitDILocalVariable()
1622 CheckDI(!isa<DISubroutineType>(Ty), "invalid type", &N, N.getType()); in visitDILocalVariable()
1626 CheckDI(!N.getNumOperands(), "DIAssignID has no arguments", &N); in visitDIAssignID()
1627 CheckDI(N.isDistinct(), "DIAssignID must be distinct", &N); in visitDIAssignID()
1632 CheckDI(isa<DIScope>(S), "invalid scope", &N, S); in visitDILabel()
1634 CheckDI(isa<DIFile>(F), "invalid file", &N, F); in visitDILabel()
1636 CheckDI(N.getTag() == dwarf::DW_TAG_label, "invalid tag", &N); in visitDILabel()
1637 CheckDI(N.getRawScope() && isa<DILocalScope>(N.getRawScope()), in visitDILabel()
1642 CheckDI(N.isValid(), "invalid expression", &N); in visitDIExpression()
1647 CheckDI(GVE.getVariable(), "missing variable"); in visitDIGlobalVariableExpression()
1658 CheckDI(N.getTag() == dwarf::DW_TAG_APPLE_property, "invalid tag", &N); in visitDIObjCProperty()
1660 CheckDI(isType(T), "invalid type ref", &N, T); in visitDIObjCProperty()
1662 CheckDI(isa<DIFile>(F), "invalid file", &N, F); in visitDIObjCProperty()
1666 CheckDI(N.getTag() == dwarf::DW_TAG_imported_module || in visitDIImportedEntity()
1670 CheckDI(isa<DIScope>(S), "invalid scope for imported entity", &N, S); in visitDIImportedEntity()
1671 CheckDI(isDINode(N.getRawEntity()), "invalid imported entity", &N, in visitDIImportedEntity()
2763 CheckDI(F.IsNewDbgInfoFormat == F.getParent()->IsNewDbgInfoFormat, in visitFunction()
2898 CheckDI(I.first != LLVMContext::MD_dbg || in visitFunction()
2937 CheckDI(NumDebugAttachments == 1, in visitFunction()
2939 CheckDI(isa<DISubprogram>(I.second), in visitFunction()
2941 CheckDI(cast<DISubprogram>(I.second)->isDistinct(), in visitFunction()
2947 CheckDI(!AttachedTo || AttachedTo == &F, in visitFunction()
3024 CheckDI(Parent && isa<DILocalScope>(Parent), in visitFunction()
3040 CheckDI(SP->describes(&F), in visitFunction()
3111 CheckDI(BB.IsNewDbgInfoFormat == BB.getParent()->IsNewDbgInfoFormat, in visitBasicBlock()
3118 CheckDI(!BB.getTrailingDbgRecords(), "Basic Block has trailing DbgRecords!", in visitBasicBlock()
3767 CheckDI(Call.getDebugLoc(), in visitCallBase()
4875 CheckDI(ExpectedInstTy, "!DIAssignID attached to unexpected instruction kind", in visitDIAssignIDMetadata()
4881 CheckDI(isa<DbgAssignIntrinsic>(User), in visitDIAssignIDMetadata()
4886 CheckDI(DAI->getFunction() == I.getFunction(), in visitDIAssignIDMetadata()
4892 CheckDI(DVR->isDbgAssign(), in visitDIAssignIDMetadata()
4894 CheckDI(DVR->getFunction() == I.getFunction(), in visitDIAssignIDMetadata()
5247 CheckDI(isa<DILocation>(N), "invalid !dbg metadata attachment", &I, N); in visitInstruction()
6389 CheckDI(isa<DILabel>(DLR.getRawLabel()), in visit()
6403 CheckDI(Loc, "#dbg_label record requires a !dbg attachment", &DLR, BB, F); in visit()
6410 CheckDI(LabelSP == LocSP, in visit()
6420 CheckDI(DVR.getType() == DbgVariableRecord::LocationType::Value || in visit()
6429 CheckDI(MD && (isa<ValueAsMetadata>(MD) || isa<DIArgList>(MD) || in visit()
6437 CheckDI(isa_and_nonnull<DILocalVariable>(DVR.getRawVariable()), in visit()
6441 CheckDI(isa_and_nonnull<DIExpression>(DVR.getRawExpression()), in visit()
6446 CheckDI(isa_and_nonnull<DIAssignID>(DVR.getRawAssignID()), in visit()
6455 CheckDI( in visit()
6462 CheckDI(isa_and_nonnull<DIExpression>(DVR.getRawAddressExpression()), in visit()
6469 CheckDI(DVR.getFunction() == I->getFunction(), in visit()
6475 CheckDI(isType(Var->getRawType()), "invalid type ref", Var, in visit()
6479 CheckDI(isa_and_nonnull<DILocation>(DLNode), "invalid #dbg record DILocation", in visit()
6489 CheckDI(VarSP == LocSP, in visit()
6735 CheckDI(isa<ValueAsMetadata>(MD) || isa<DIArgList>(MD) || in visitDbgIntrinsic()
6738 CheckDI(isa<DILocalVariable>(DII.getRawVariable()), in visitDbgIntrinsic()
6741 CheckDI(isa<DIExpression>(DII.getRawExpression()), in visitDbgIntrinsic()
6746 CheckDI(isa<DIAssignID>(DAI->getRawAssignID()), in visitDbgIntrinsic()
6750 CheckDI( in visitDbgIntrinsic()
6755 CheckDI(isa<DIExpression>(DAI->getRawAddressExpression()), in visitDbgIntrinsic()
6760 CheckDI(DAI->getFunction() == I->getFunction(), in visitDbgIntrinsic()
6775 CheckDI(Loc, "llvm.dbg." + Kind + " intrinsic requires a !dbg attachment", in visitDbgIntrinsic()
6783 CheckDI(VarSP == LocSP, in visitDbgIntrinsic()
6790 CheckDI(isType(Var->getRawType()), "invalid type ref", Var, in visitDbgIntrinsic()
6796 CheckDI(isa<DILabel>(DLI.getRawLabel()), in visitDbgLabelIntrinsic()
6819 CheckDI(LabelSP == LocSP, in visitDbgLabelIntrinsic()
6887 CheckDI(FragSize + FragOffset <= *VarSize, in verifyFragmentExpression()
6889 CheckDI(FragSize != *VarSize, "fragment covers entire variable", Desc, &V); in verifyFragmentExpression()
6904 CheckDI(Var, "dbg intrinsic without variable"); in verifyFnArgs()
6917 CheckDI(!Prev || (Prev == Var), "conflicting debug info for argument", &I, in verifyFnArgs()
6932 CheckDI(Var, "#dbg record without variable"); in verifyFnArgs()
6945 CheckDI(!Prev || (Prev == Var), "conflicting debug info for argument", &DVR, in verifyFnArgs()
6967 CheckDI(!E->isEntryValue(), in verifyNotEntryValue()
6990 CheckDI(!E->isEntryValue(), in verifyNotEntryValue()
7007 CheckDI(Listed.count(CU), "DICompileUnit not listed in llvm.dbg.cu", CU); in verifyCompileUnits()