Lines Matching refs:Assert1
392 #define Assert1(C, M, V1) \
403 Assert1(I.getOperand(i) != 0, "Operand is null", &I);
409 Assert1(!GV.isDeclaration() ||
419 Assert1(!GV.hasDLLImportLinkage() || GV.isDeclaration(),
422 Assert1(!GV.hasAppendingLinkage() || isa<GlobalVariable>(GV),
427 Assert1(GVar && GVar->getType()->getElementType()->isArrayTy(),
431 Assert1
438 Assert1(GV.getInitializer()->getType() == GV.getType()->getElementType(),
445 Assert1(GV.getInitializer()->isNullValue(),
447 Assert1(!GV.isConstant(), "'common' global may not be marked constant!",
451 Assert1(GV.hasExternalLinkage() || GV.hasDLLImportLinkage() ||
458 Assert1(!GV.hasInitializer() || GV.hasAppendingLinkage(),
466 Assert1(STy && STy->getNumElements() == 2 &&
475 Assert1(!GV.hasInitializer() || GV.hasAppendingLinkage(),
480 Assert1(PTy, "wrong type for intrinsic global variable", &GV);
484 Assert1(InitArray, "wrong initalizer for intrinsic global variable",
488 Assert1(
491 Assert1(V->hasName(), "members of llvm.used must be named", V);
528 Assert1(!GA.getName().empty(),
530 Assert1(GA.hasExternalLinkage() || GA.hasLocalLinkage() ||
533 Assert1(GA.getAliasee(),
535 Assert1(GA.getType() == GA.getAliasee()->getType(),
537 Assert1(!GA.hasUnnamedAddr(), "Alias cannot have unnamed_addr!", &GA);
543 Assert1(CE &&
554 Assert1(SrcAS == DstAS,
561 Assert1(Resolved,
573 Assert1(!MD->isFunctionLocal(),
652 Assert1(Op->getNumOperands() == 3,
656 Assert1(Behavior,
660 Assert1(ID,
667 Assert1(false,
682 Assert1(Value && Value->getNumOperands() == 2,
685 Assert1(isa<MDString>(Value->getOperand(0)),
699 Assert1(isa<MDNode>(Op->getOperand(2)),
709 Assert1(Inserted,
785 Assert1(!Attrs.hasAttribute(Idx, Attribute::ByVal) &&
794 Assert1(!((Attrs.hasAttribute(Idx, Attribute::ByVal) &&
802 Assert1(!((Attrs.hasAttribute(Idx, Attribute::ByVal) &&
810 Assert1(!(Attrs.hasAttribute(Idx, Attribute::StructRet) &&
814 Assert1(!(Attrs.hasAttribute(Idx, Attribute::ZExt) &&
818 Assert1(!(Attrs.hasAttribute(Idx, Attribute::ReadNone) &&
822 Assert1(!(Attrs.hasAttribute(Idx, Attribute::NoInline) &&
826 Assert1(!AttrBuilder(Attrs, Idx).
832 Assert1(!Attrs.hasAttribute(Idx, Attribute::ByVal) ||
836 Assert1(!Attrs.hasAttribute(Idx, Attribute::ByVal),
868 Assert1(!SawNest, "More than one parameter has attribute nest!", V);
873 Assert1(!SawReturned, "More than one parameter has attribute returned!",
875 Assert1(Ty->canLosslesslyBitCastTo(FT->getReturnType()), "Incompatible "
881 Assert1(Idx == 1, "Attribute sret is not on first parameter!", V);
889 Assert1(!(Attrs.hasAttribute(AttributeSet::FunctionIndex,
895 Assert1(!(Attrs.hasAttribute(AttributeSet::FunctionIndex,
909 Assert1(SrcTy->isPointerTy() == DestTy->isPointerTy(),
911 Assert1(SrcBitSize == DestBitSize,
915 Assert1(!SrcTy->isAggregateType(),
917 Assert1(!DestTy->isAggregateType(),
935 Assert1(SrcASSize == DstASSize,
969 Assert1(Context == &F.getContext(),
972 Assert1(!F.hasCommonLinkage(), "Functions may not have common linkage", &F);
976 Assert1(F.getReturnType()->isFirstClassType() ||
981 Assert1(!F.hasStructRetAttr() || F.getReturnType()->isVoidTy(),
986 Assert1(VerifyAttributeCount(Attrs, FT->getNumParams()),
995 Assert1(!Attrs.hasAttribute(AttributeSet::FunctionIndex,
1012 Assert1(!F.isVarArg(),
1027 Assert1(I->getType()->isFirstClassType(),
1037 Assert1(F.hasExternalLinkage() || F.hasDLLImportLinkage() ||
1043 Assert1(!isLLVMdotName, "llvm intrinsics cannot be defined!", &F);
1047 Assert1(pred_begin(Entry) == pred_end(Entry),
1052 Assert1(!BlockAddress::get(Entry)->isConstantUsed(),
1062 Assert1(0, "Invalid user of intrinsic instruction!", U);
1072 Assert1(BB.getTerminator(), "Basic Block does not have terminator!", &BB);
1083 Assert1(PN->getNumIncomingValues() != 0,
1086 Assert1(PN->getNumIncomingValues() == Preds.size(),
1121 Assert1(&I == I.getParent()->getTerminator(),
1162 Assert1(((const APInt&)r.getLow()).getBitWidth() == IntTy->getBitWidth(),
1164 Assert1(((const APInt&)r.getHigh()).getBitWidth() == IntTy->getBitWidth(),
1182 Assert1(BI.getAddress()->getType()->isPointerTy(),
1185 Assert1(BI.getDestination(i)->getType()->isLabelTy(),
1192 Assert1(!SelectInst::areInvalidOperands(SI.getOperand(0), SI.getOperand(1),
1196 Assert1(SI.getTrueValue()->getType() == SI.getType(),
1205 Assert1(0, "User-defined operators should not live outside of a pass!", &I);
1217 Assert1(SrcTy->isIntOrIntVectorTy(), "Trunc only operates on integer", &I);
1218 Assert1(DestTy->isIntOrIntVectorTy(), "Trunc only produces integer", &I);
1219 Assert1(SrcTy->isVectorTy() == DestTy->isVectorTy(),
1221 Assert1(SrcBitSize > DestBitSize,"DestTy too big for Trunc", &I);
1232 Assert1(SrcTy->isIntOrIntVectorTy(), "ZExt only operates on integer", &I);
1233 Assert1(DestTy->isIntOrIntVectorTy(), "ZExt only produces an integer", &I);
1234 Assert1(SrcTy->isVectorTy() == DestTy->isVectorTy(),
1239 Assert1(SrcBitSize < DestBitSize,"Type too small for ZExt", &I);
1253 Assert1(SrcTy->isIntOrIntVectorTy(), "SExt only operates on integer", &I);
1254 Assert1(DestTy->isIntOrIntVectorTy(), "SExt only produces an integer", &I);
1255 Assert1(SrcTy->isVectorTy() == DestTy->isVectorTy(),
1257 Assert1(SrcBitSize < DestBitSize,"Type too small for SExt", &I);
1270 Assert1(SrcTy->isFPOrFPVectorTy(),"FPTrunc only operates on FP", &I);
1271 Assert1(DestTy->isFPOrFPVectorTy(),"FPTrunc only produces an FP", &I);
1272 Assert1
1274 Assert1(SrcBitSize > DestBitSize,"DestTy too big for FPTrunc", &I);
1288 Assert1(SrcTy->isFPOrFPVectorTy(),"FPExt only operates on FP", &I);
1289 Assert1(DestTy->isFPOrFPVectorTy(),"FPExt only produces an FP", &I);
1290 Assert1(SrcTy->isVectorTy() == DestTy->isVectorTy(),
1292 Assert1(SrcBitSize < DestBitSize,"DestTy too small for FPExt", &I);
1305 Assert1(SrcVec == DstVec,
1307 Assert1(SrcTy->isIntOrIntVectorTy(),
1309 Assert1(DestTy->isFPOrFPVectorTy(),
1313 Assert1(cast<VectorType>(SrcTy)->getNumElements() ==
1328 Assert1(SrcVec == DstVec,
1330 Assert1(SrcTy->isIntOrIntVectorTy(),
1332 Assert1(DestTy->isFPOrFPVectorTy(),
1336 Assert1(cast<VectorType>(SrcTy)->getNumElements() ==
1351 Assert1(SrcVec == DstVec,
1353 Assert1(SrcTy->isFPOrFPVectorTy(), "FPToUI source must be FP or FP vector",
1355 Assert1(DestTy->isIntOrIntVectorTy(),
1359 Assert1(cast<VectorType>(SrcTy)->getNumElements() ==
1374 Assert1(SrcVec == DstVec,
1376 Assert1(SrcTy->isFPOrFPVectorTy(),
1378 Assert1(DestTy->isIntOrIntVectorTy(),
1382 Assert1(cast<VectorType>(SrcTy)->getNumElements() ==
1394 Assert1(SrcTy->getScalarType()->isPointerTy(),
1396 Assert1(DestTy->getScalarType()->isIntegerTy(),
1398 Assert1(SrcTy->isVectorTy() == DestTy->isVectorTy(),
1404 Assert1(VSrc->getNumElements() == VDest->getNumElements(),
1416 Assert1(SrcTy->getScalarType()->isIntegerTy(),
1418 Assert1(DestTy->getScalarType()->isPointerTy(),
1420 Assert1(SrcTy->isVectorTy() == DestTy->isVectorTy(),
1425 Assert1(VSrc->getNumElements() == VDest->getNumElements(),
1453 Assert1(PN.getType() == PN.getIncomingValue(i)->getType(),
1465 Assert1(CS.getCalledValue()->getType()->isPointerTy(),
1469 Assert1(FPTy->getElementType()->isFunctionTy(),
1475 Assert1(CS.arg_size() >= FTy->getNumParams(),
1478 Assert1(CS.arg_size() == FTy->getNumParams(),
1489 Assert1(VerifyAttributeCount(Attrs, CS.arg_size()),
1513 Assert1(!SawNest, "More than one parameter has attribute nest!", I);
1518 Assert1(!SawReturned, "More than one parameter has attribute returned!",
1520 Assert1(Ty->canLosslesslyBitCastTo(FTy->getReturnType()),
1526 Assert1(!Attrs.hasAttribute(Idx, Attribute::StructRet),
1536 Assert1(!(*PI)->isMetadataTy(),
1543 Assert1(CS.getCalledFunction() &&
1564 Assert1(II.getUnwindDest()->isLandingPad(),
1574 Assert1(B.getOperand(0)->getType() == B.getOperand(1)->getType(),
1587 Assert1(B.getType()->isIntOrIntVectorTy(),
1589 Assert1(B.getType() == B.getOperand(0)->getType(),
1600 Assert1(B.getType()->isFPOrFPVectorTy(),
1603 Assert1(B.getType() == B.getOperand(0)->getType(),
1611 Assert1(B.getType()->isIntOrIntVectorTy(),
1613 Assert1(B.getType() == B.getOperand(0)->getType(),
1620 Assert1(B.getType()->isIntOrIntVectorTy(),
1622 Assert1(B.getType() == B.getOperand(0)->getType(),
1636 Assert1(Op0Ty == Op1Ty,
1639 Assert1(Op0Ty->isIntOrIntVectorTy() || Op0Ty->getScalarType()->isPointerTy(),
1642 Assert1(IC.getPredicate() >= CmpInst::FIRST_ICMP_PREDICATE &&
1653 Assert1(Op0Ty == Op1Ty,
1656 Assert1(Op0Ty->isFPOrFPVectorTy(),
1659 Assert1(FC.getPredicate() >= CmpInst::FIRST_FCMP_PREDICATE &&
1667 Assert1(ExtractElementInst::isValidOperands(EI.getOperand(0),
1674 Assert1(InsertElementInst::isValidOperands(IE.getOperand(0),
1682 Assert1(ShuffleVectorInst::isValidOperands(SV.getOperand(0), SV.getOperand(1),
1691 Assert1(isa<PointerType>(TargetTy),
1693 Assert1(cast<PointerType>(TargetTy)->getElementType()->isSized(),
1695 Assert1(GEP.getPointerOperandType()->isVectorTy() ==
1702 Assert1(ElTy, "Invalid indices for GEP pointer type!", &GEP);
1711 Assert1(GepWidth == GEP.getType()->getVectorNumElements(),
1715 Assert1(IndexTy->isVectorTy(),
1718 Assert1(IndexWidth == GepWidth, "Invalid GEP index vector width", &GEP);
1730 Assert1(PTy, "Load operand must be a pointer.", &LI);
1735 Assert1(LI.getOrdering() != Release && LI.getOrdering() != AcquireRelease,
1737 Assert1(LI.getAlignment() != 0,
1749 Assert1(LI.getSynchScope() == CrossThread,
1755 Assert1(NumOperands % 2 == 0, "Unfinished range!", Range);
1757 Assert1(NumRanges >= 1, "It should have at least one range!", Range);
1762 Assert1(Low, "The lower limit must be an integer!", Low);
1764 Assert1(High, "The upper limit must be an integer!", High);
1765 Assert1(High->getType() == Low->getType() &&
1772 Assert1(!CurRange.isEmptySet() && !CurRange.isFullSet(),
1775 Assert1(CurRange.intersectWith(LastRange).isEmptySet(),
1777 Assert1(LowV.sgt(LastRange.getLower()), "Intervals are not in order",
1779 Assert1(!isContiguous(CurRange, LastRange), "Intervals are contiguous",
1790 Assert1(FirstRange.intersectWith(LastRange).isEmptySet(),
1792 Assert1(!isContiguous(FirstRange, LastRange), "Intervals are contiguous",
1804 Assert1(PTy, "Store operand must be a pointer.", &SI);
1810 Assert1(SI.getOrdering() != Acquire && SI.getOrdering() != AcquireRelease,
1812 Assert1(SI.getAlignment() != 0,
1824 Assert1(SI.getSynchScope() == CrossThread,
1832 Assert1(PTy->getAddressSpace() == 0,
1835 Assert1(PTy->getElementType()->isSized(), "Cannot allocate unsized type",
1837 Assert1(AI.getArraySize()->getType()->isIntegerTy(),
1843 Assert1(CXI.getOrdering() != NotAtomic,
1845 Assert1(CXI.getOrdering() != Unordered,
1848 Assert1(PTy, "First cmpxchg operand must be a pointer.", &CXI);
1867 Assert1(RMWI.getOrdering() != NotAtomic,
1869 Assert1(RMWI.getOrdering() != Unordered,
1872 Assert1(PTy, "First atomicrmw operand must be a pointer.", &RMWI);
1884 Assert1(AtomicRMWInst::FIRST_BINOP <= RMWI.getOperation() &&
1892 Assert1(Ordering == Acquire || Ordering == Release ||
1900 Assert1(ExtractValueInst::getIndexedType(EVI.getAggregateOperand()->getType(),
1909 Assert1(ExtractValueInst::getIndexedType(IVI.getAggregateOperand()->getType(),
1922 Assert1(LPI.getNumClauses() > 0 || LPI.isCleanup(),
1929 Assert1(II && II->getUnwindDest() == BB && II->getNormalDest() != BB,
1936 Assert1(LPI.getParent()->getLandingPadInst() == &LPI,
1943 Assert1(LPI.getPersonalityFn() == PersonalityFn,
1948 Assert1(isa<Constant>(PersonalityFn), "Personality function is not constant!",
1952 Assert1(isa<Constant>(Clause), "Clause is not constant!", &LPI);
1954 Assert1(isa<PointerType>(Clause->getType()),
1957 Assert1(LPI.isFilter(i), "Clause is neither catch nor filter!", &LPI);
1958 Assert1(isa<ConstantArray>(Clause) || isa<ConstantAggregateZero>(Clause),
1985 Assert1(BB, "Instruction not embedded in basic block!", &I);
1990 Assert1(*UI != (User*)&I || !DT->isReachableFromEntry(BB),
1995 Assert1(!I.getType()->isVoidTy() || !I.hasName(),
2000 Assert1(I.getType()->isVoidTy() ||
2006 Assert1(!I.getType()->isMetadataTy() ||
2025 Assert1(I.getOperand(i) != 0, "Instruction has null operand!", &I);
2030 Assert1(0, "Instruction operands must be first-class values!", &I);
2036 Assert1(!F->isIntrinsic() || i == (isa<CallInst>(I) ? e-1 : 0),
2038 Assert1(!F->isIntrinsic() || isa<CallInst>(I) ||
2041 Assert1(F->getParent() == Mod, "Referencing function in another module!",
2044 Assert1(OpBB->getParent() == BB->getParent(),
2047 Assert1(OpArg->getParent() == BB->getParent(),
2050 Assert1(GV->getParent() == Mod, "Referencing global in another module!",
2055 Assert1((i + 1 == e && isa<CallInst>(I)) ||
2083 Assert1(I.getType()->isFPOrFPVectorTy(),
2085 Assert1(MD->getNumOperands() == 1, "fpmath takes one operand!", &I);
2089 Assert1(Accuracy.isFiniteNonZero() && !Accuracy.isNegative(),
2092 Assert1(false, "invalid fpmath accuracy!", &I);
2097 Assert1(!MD || isa<LoadInst>(I), "Ranges are only for loads!", &I);
2192 Assert1(IF->isDeclaration(), "Intrinsic functions should never be defined!",
2198 Assert1(!IFTy->isVarArg(), "Intrinsic prototypes are not varargs", IF);
2205 Assert1(!VerifyIntrinsicType(IFTy->getReturnType(), TableRef, ArgTys),
2208 Assert1(!VerifyIntrinsicType(IFTy->getParamType(i), TableRef, ArgTys),
2210 Assert1(TableRef.empty(), "Intrinsic has too few arguments!", IF);
2216 Assert1(Intrinsic::getName(ID, ArgTys) == IF->getName(),
2230 Assert1(isa<ConstantInt>(CI.getArgOperand(1)),
2235 Assert1(CI.getArgOperand(0) && isa<MDNode>(CI.getArgOperand(0)),
2238 Assert1(MD->getNumOperands() == 1,
2245 Assert1(CI.getArgOperand(0) && isa<MDNode>(CI.getArgOperand(0)),
2254 Assert1(isa<ConstantInt>(CI.getArgOperand(3)),
2257 Assert1(isa<ConstantInt>(CI.getArgOperand(4)),
2267 Assert1(AI, "llvm.gcroot parameter #1 must be an alloca.", &CI);
2268 Assert1(isa<Constant>(CI.getArgOperand(1)),
2271 Assert1(!isa<ConstantPointerNull>(CI.getArgOperand(1)),
2277 Assert1(CI.getParent()->getParent()->hasGC(),
2281 Assert1(isa<Function>(CI.getArgOperand(1)->stripPointerCasts()),
2286 Assert1(isa<ConstantInt>(CI.getArgOperand(1)) &&
2294 Assert1(isa<AllocaInst>(CI.getArgOperand(1)->stripPointerCasts()),
2301 Assert1(isa<ConstantInt>(CI.getArgOperand(0)),
2306 Assert1(isa<ConstantInt>(CI.getArgOperand(1)),
2319 Assert1(DICompileUnit(*I).Verify(), "DICompileUnit does not Verify!", *I);
2322 Assert1(DISubprogram(*I).Verify(), "DISubprogram does not Verify!", *I);
2325 Assert1(DIGlobalVariable(*I).Verify(),
2329 Assert1(DIType(*I).Verify(), "DIType does not Verify!", *I);
2332 Assert1(DIScope(*I).Verify(), "DIScope does not Verify!", *I);