Add assert.

llvm-svn: 47641
This commit is contained in:
Devang Patel 2008-02-26 23:17:50 +00:00
parent e41c19c987
commit 4db58fce82
1 changed files with 2 additions and 2 deletions

View File

@ -2581,8 +2581,8 @@ InstructionList : InstructionList Inst {
BBTerminatorInst :
RET ReturnedVal { // Return with a result...
ValueList &VL = *$2;
if (!VL.empty())
$$ = new ReturnInst(&VL[0], VL.size());
assert(!VL.empty() && "Invalid ret operands!");
$$ = new ReturnInst(&VL[0], VL.size());
delete $2;
CHECK_FOR_ERROR
}