diff options
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 32f8cf0ae0d..7369aa88abe 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -4154,14 +4154,14 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) { getIntrinsicInfoTableEntries(ID, Table); ArrayRef<Intrinsic::IITDescriptor> TableRef = Table; + // Walk the descriptors to extract overloaded types. SmallVector<Type *, 4> ArgTys; - Assert(!Intrinsic::matchIntrinsicType(IFTy->getReturnType(), - TableRef, ArgTys), + Intrinsic::MatchIntrinsicTypesResult Res = + Intrinsic::matchIntrinsicSignature(IFTy, TableRef, ArgTys); + Assert(Res != Intrinsic::MatchIntrinsicTypes_NoMatchRet, "Intrinsic has incorrect return type!", IF); - for (unsigned i = 0, e = IFTy->getNumParams(); i != e; ++i) - Assert(!Intrinsic::matchIntrinsicType(IFTy->getParamType(i), - TableRef, ArgTys), - "Intrinsic has incorrect argument type!", IF); + Assert(Res != Intrinsic::MatchIntrinsicTypes_NoMatchArg, + "Intrinsic has incorrect argument type!", IF); // Verify if the intrinsic call matches the vararg property. if (IsVarArg) |