AsmParser: extractvalue requires at least one index operand

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229365 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Majnemer 2015-02-16 09:18:13 +00:00
parent 40d10639cf
commit 415561b6e0
2 changed files with 9 additions and 0 deletions

View File

@ -1633,6 +1633,7 @@ bool LLParser::ParseIndexList(SmallVectorImpl<unsigned> &Indices,
while (EatIfPresent(lltok::comma)) {
if (Lex.getKind() == lltok::MetadataVar) {
if (Indices.empty()) return TokError("expected index");
AteExtraComma = true;
return false;
}

View File

@ -0,0 +1,8 @@
; RUN: not llvm-as < %s 2>&1 | FileCheck %s
; CHECK: expected index
define void @f1() {
extractvalue <{ i32, i32 }> undef, !dbg !0
ret void
}