From 7ccc34dbc163f93fb36c59c961b355c97f4455ea Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Mon, 16 Feb 2015 09:18:13 +0000 Subject: AsmParser: extractvalue requires at least one index operand llvm-svn: 229365 --- llvm/lib/AsmParser/LLParser.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/AsmParser/LLParser.cpp') diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 7818586dfa4..47125ca954c 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -1633,6 +1633,7 @@ bool LLParser::ParseIndexList(SmallVectorImpl &Indices, while (EatIfPresent(lltok::comma)) { if (Lex.getKind() == lltok::MetadataVar) { + if (Indices.empty()) return TokError("expected index"); AteExtraComma = true; return false; } -- cgit v1.2.3