aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2004-12-04 01:25:06 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2004-12-04 01:25:06 +0000
commit8b42b43dc24266beb8427acb7d3779dce432496a (patch)
treeb861ec1d7219994decf75a4b23b7196960d5e364 /lib
parentead1b3f0bb70cd9c1ba7a853a79070cb47db9344 (diff)
downloadexternal_llvm-8b42b43dc24266beb8427acb7d3779dce432496a.zip
external_llvm-8b42b43dc24266beb8427acb7d3779dce432496a.tar.gz
external_llvm-8b42b43dc24266beb8427acb7d3779dce432496a.tar.bz2
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
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/Verifier.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp
index 38fbabb..3a3e6e5 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 "