Skip to content

Commit 4db58fc

Browse files
author
Devang Patel
committed
Add assert.
llvm-svn: 47641
1 parent e41c19c commit 4db58fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/AsmParser/llvmAsmParser.y

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2581,8 +2581,8 @@ InstructionList : InstructionList Inst {
25812581
BBTerminatorInst :
25822582
RET ReturnedVal { // Return with a result...
25832583
ValueList &VL = *$2;
2584-
if (!VL.empty())
2585-
$$ = new ReturnInst(&VL[0], VL.size());
2584+
assert(!VL.empty() && "Invalid ret operands!");
2585+
$$ = new ReturnInst(&VL[0], VL.size());
25862586
delete $2;
25872587
CHECK_FOR_ERROR
25882588
}

0 commit comments

Comments
 (0)