Fix an assumption that there is a single return value when verifying
overloaded types for intrinsic parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77466 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp
index 06bc9e7..6d179d0 100644
--- a/lib/VMCore/Verifier.cpp
+++ b/lib/VMCore/Verifier.cpp
@@ -1544,9 +1544,9 @@
return false;
}
} else {
- if (Ty != FTy->getParamType(Match - 1)) {
+ if (Ty != FTy->getParamType(Match - NumRets)) {
CheckFailed(IntrinsicParam(ArgNo, NumRets) + " does not "
- "match parameter %" + utostr(Match - 1) + ".", F);
+ "match parameter %" + utostr(Match - NumRets) + ".", F);
return false;
}
}