llvm.org GIT mirror llvm / 70c44f0
Correct this error message. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59370 91177308-0d34-0410-b5e6-96231b3b80d8 Nick Lewycky 12 years ago
2 changed file(s) with 6 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
638638 unsigned N = RI.getNumOperands();
639639 if (F->getReturnType() == Type::VoidTy)
640640 Assert2(N == 0,
641 "Found return instr that returns void in Function of non-void "
641 "Found return instr that returns non-void in Function of void "
642642 "return type!", &RI, F->getReturnType());
643643 else if (N == 1 && F->getReturnType() == RI.getOperand(0)->getType()) {
644644 // Exactly one return value and it matches the return type. Good.
0 ; RUN: not llvm-as < %s |& grep {returns non-void in Function of void return}
1
2 define void @foo() {
3 ret i32 0
4 }