mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
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
This commit is contained in:
@@ -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 "
|
||||
|
Reference in New Issue
Block a user