From: Alkis Evlogimenos Date: Sat, 4 Dec 2004 01:25:06 +0000 (+0000) Subject: Make error msg reflect what exactly went wrong. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8b42b43dc24266beb8427acb7d3779dce432496a;p=oota-llvm.git Make error msg reflect what exactly went wrong. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18478 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 38fbabb6c9b..3a3e6e5c325 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -379,9 +379,9 @@ void Verifier::visitTerminatorInst(TerminatorInst &I) { void Verifier::visitReturnInst(ReturnInst &RI) { Function *F = RI.getParent()->getParent(); if (RI.getNumOperands() == 0) - Assert1(F->getReturnType() == Type::VoidTy, - "Function returns no value, but ret instruction found that does!", - &RI); + Assert2(F->getReturnType() == Type::VoidTy, + "Found return instr that returns void in Function of non-void " + "return type!", &RI, F->getReturnType()); else Assert2(F->getReturnType() == RI.getOperand(0)->getType(), "Function return type does not match operand "