1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

AsmParser: extractvalue requires at least one index operand

llvm-svn: 229365
This commit is contained in:
David Majnemer 2015-02-16 09:18:13 +00:00
parent 7f40c08dca
commit 4f5d97ee4f
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)) { while (EatIfPresent(lltok::comma)) {
if (Lex.getKind() == lltok::MetadataVar) { if (Lex.getKind() == lltok::MetadataVar) {
if (Indices.empty()) return TokError("expected index");
AteExtraComma = true; AteExtraComma = true;
return false; 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
}