mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-02 07:41:38 +00:00
Correct this error message.
llvm-svn: 59370
This commit is contained in:
parent
bce4760ed8
commit
75d57a3bc3
@ -639,7 +639,7 @@ void Verifier::visitReturnInst(ReturnInst &RI) {
|
||||
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.
|
||||
|
5
test/Verifier/2008-11-15-RetVoid.ll
Normal file
5
test/Verifier/2008-11-15-RetVoid.ll
Normal file
@ -0,0 +1,5 @@
|
||||
; RUN: not llvm-as < %s |& grep {returns non-void in Function of void return}
|
||||
|
||||
define void @foo() {
|
||||
ret i32 0
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user