diff options
Diffstat (limited to 'llvm/lib/VMCore/Verifier.cpp')
| -rw-r--r-- | llvm/lib/VMCore/Verifier.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp index 1d441d1dd5e..98288f41427 100644 --- a/llvm/lib/VMCore/Verifier.cpp +++ b/llvm/lib/VMCore/Verifier.cpp @@ -241,6 +241,9 @@ void Verifier::visitFunction(Function &F) { Assert2(FT->getNumParams() == NumArgs, "# formal arguments must match # of arguments for function type!", &F, FT); + Assert1(F.getReturnType()->isFirstClassType() || + F.getReturnType() == Type::VoidTy, + "Functions cannot return aggregate values!", &F); // Check that the argument values match the function type for this function... unsigned i = 0; |

