projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf931bb
)
Add assert.
author
Devang Patel
<dpatel@apple.com>
Tue, 26 Feb 2008 23:17:50 +0000
(23:17 +0000)
committer
Devang Patel
<dpatel@apple.com>
Tue, 26 Feb 2008 23:17:50 +0000
(23:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47641
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/AsmParser/llvmAsmParser.y
patch
|
blob
|
history
diff --git
a/lib/AsmParser/llvmAsmParser.y
b/lib/AsmParser/llvmAsmParser.y
index b7b40090e8318579ec6179cf0ed61ccbde86b327..5a824ae8fe44b9b24c9972869946b741ddef3092 100644
(file)
--- a/
lib/AsmParser/llvmAsmParser.y
+++ b/
lib/AsmParser/llvmAsmParser.y
@@
-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
}