diff options
author | Dan Gohman <gohman@apple.com> | 2008-06-05 23:57:06 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-06-05 23:57:06 +0000 |
commit | 836bfcd6896526a21ad1c800b1ca5ae90de1df0a (patch) | |
tree | f620cd86832fe709a95a0e45eb09aa44a089573f /lib/VMCore/Verifier.cpp | |
parent | 5c490610a166a31b4a34c9fcaebbf744fd524049 (diff) | |
download | external_llvm-836bfcd6896526a21ad1c800b1ca5ae90de1df0a.zip external_llvm-836bfcd6896526a21ad1c800b1ca5ae90de1df0a.tar.gz external_llvm-836bfcd6896526a21ad1c800b1ca5ae90de1df0a.tar.bz2 |
Revert 52002.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52030 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Verifier.cpp')
-rw-r--r-- | lib/VMCore/Verifier.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 8cbb703..bfa2e65 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -594,10 +594,7 @@ void Verifier::visitReturnInst(ReturnInst &RI) { Assert2(N == 0, "Found return instr that returns void in Function of non-void " "return type!", &RI, F->getReturnType()); - else if (N > 1) { - const StructType *STy = dyn_cast<StructType>(F->getReturnType()); - Assert2(STy, "Return instr with multiple values, but return type is not " - "a struct", &RI, F->getReturnType()); + else if (const StructType *STy = dyn_cast<StructType>(F->getReturnType())) { Assert2(STy->getNumElements() == N, "Incorrect number of return values in ret instruction!", &RI, F->getReturnType()); |