reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

lib/IR/Verifier.cpp
 2818   Assert(Call.getCalledValue()->getType()->isPointerTy(),
 2819          "Called function must be a pointer!", Call);
 2820   PointerType *FPTy = cast<PointerType>(Call.getCalledValue()->getType());
 2823          "Called function is not pointer to function type!", Call);
 2825   Assert(FPTy->getElementType() == Call.getFunctionType(),
 2826          "Called function is not the same type as the call!", Call);
 2828   FunctionType *FTy = Call.getFunctionType();
 2832     Assert(Call.arg_size() >= FTy->getNumParams(),
 2834            Call);
 2836     Assert(Call.arg_size() == FTy->getNumParams(),
 2837            "Incorrect number of arguments passed to called function!", Call);
 2841     Assert(Call.getArgOperand(i)->getType() == FTy->getParamType(i),
 2843            Call.getArgOperand(i), FTy->getParamType(i), Call);
 2843            Call.getArgOperand(i), FTy->getParamType(i), Call);
 2845   AttributeList Attrs = Call.getAttributes();
 2847   Assert(verifyAttributeCount(Attrs, Call.arg_size()),
 2848          "Attribute after last parameter!", Call);
 2850   bool IsIntrinsic = Call.getCalledFunction() &&
 2851                      Call.getCalledFunction()->getName().startswith("llvm.");
 2854     = dyn_cast<Function>(Call.getCalledValue()->stripPointerCasts());
 2860            "speculatable attribute may not apply to call sites", Call);
 2864   verifyFunctionAttrs(FTy, Attrs, &Call, IsIntrinsic);
 2869   if (Call.hasInAllocaArgument()) {
 2870     Value *InAllocaArg = Call.getArgOperand(FTy->getNumParams() - 1);
 2873              "inalloca argument for call has mismatched alloca", AI, Call);
 2880     if (Call.paramHasAttr(i, Attribute::SwiftError)) {
 2881       Value *SwiftErrorArg = Call.getArgOperand(i);
 2884                "swifterror argument for call has mismatched alloca", AI, Call);
 2890              SwiftErrorArg, Call);
 2893              Call);
 2901              Call.getArgOperand(i), Call);
 2901              Call.getArgOperand(i), Call);
 2904     if (Call.paramHasAttr(i, Attribute::ImmArg)) {
 2905       Value *ArgVal = Call.getArgOperand(i);
 2907              "immarg operand has non-immediate parameter", ArgVal, Call);
 2924     for (unsigned Idx = FTy->getNumParams(); Idx < Call.arg_size(); ++Idx) {
 2925       Type *Ty = Call.getArgOperand(Idx)->getType();
 2927       verifyParameterAttrs(ArgAttrs, Ty, &Call);
 2930         Assert(!SawNest, "More than one parameter has attribute nest!", Call);
 2936                Call);
 2940                Call);
 2946       if (!Call.getCalledFunction() ||
 2947           Call.getCalledFunction()->getIntrinsicID() !=
 2951                Call);
 2954         Assert(Idx == Call.arg_size() - 1,
 2955                "inalloca isn't on the last argument!", Call);
 2963              "Function has metadata parameter but isn't an intrinsic", Call);
 2965              "Function has token parameter but isn't an intrinsic", Call);
 2970   if (!Call.getCalledFunction())
 2974   if (Function *F = Call.getCalledFunction())
 2976       visitIntrinsicCall(ID, Call);
 2982   for (unsigned i = 0, e = Call.getNumOperandBundles(); i < e; ++i) {
 2983     OperandBundleUse BU = Call.getOperandBundleAt(i);
 2986       Assert(!FoundDeoptBundle, "Multiple deopt operand bundles", Call);
 2990              Call);
 2993       Assert(!FoundFuncletBundle, "Multiple funclet operand bundles", Call);
 2996              "Expected exactly one funclet bundle operand", Call);
 2999              Call);
 3002              "Multiple CFGuardTarget operand bundles", Call);
 3005              "Expected exactly one cfguardtarget bundle operand", Call);
 3012   if (Call.getFunction()->getSubprogram() && Call.getCalledFunction() &&
 3012   if (Call.getFunction()->getSubprogram() && Call.getCalledFunction() &&
 3013       Call.getCalledFunction()->getSubprogram())
 3014     AssertDI(Call.getDebugLoc(),
 3017              Call);
 3019   visitInstruction(Call);