[llvm-commits] [llvm] r59370 - in /llvm/trunk: lib/VMCore/Verifier.cpp test/Verifier/2008-11-15-RetVoid.ll
Nick Lewycky
nicholas at mxc.ca
Sat Nov 15 09:50:49 PST 2008
Author: nicholas
Date: Sat Nov 15 11:50:47 2008
New Revision: 59370
URL: http://llvm.org/viewvc/llvm-project?rev=59370&view=rev
Log:
Correct this error message.
Added:
llvm/trunk/test/Verifier/2008-11-15-RetVoid.ll
Modified:
llvm/trunk/lib/VMCore/Verifier.cpp
Modified: llvm/trunk/lib/VMCore/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=59370&r1=59369&r2=59370&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Verifier.cpp (original)
+++ llvm/trunk/lib/VMCore/Verifier.cpp Sat Nov 15 11:50:47 2008
@@ -639,7 +639,7 @@
unsigned N = RI.getNumOperands();
if (F->getReturnType() == Type::VoidTy)
Assert2(N == 0,
- "Found return instr that returns void in Function of non-void "
+ "Found return instr that returns non-void in Function of void "
"return type!", &RI, F->getReturnType());
else if (N == 1 && F->getReturnType() == RI.getOperand(0)->getType()) {
// Exactly one return value and it matches the return type. Good.
Added: llvm/trunk/test/Verifier/2008-11-15-RetVoid.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/2008-11-15-RetVoid.ll?rev=59370&view=auto
==============================================================================
--- llvm/trunk/test/Verifier/2008-11-15-RetVoid.ll (added)
+++ llvm/trunk/test/Verifier/2008-11-15-RetVoid.ll Sat Nov 15 11:50:47 2008
@@ -0,0 +1,5 @@
+; RUN: not llvm-as < %s |& grep {returns non-void in Function of void return}
+
+define void @foo() {
+ ret i32 0
+}
More information about the llvm-commits
mailing list