reject invalid comma stuff with a message. We reject the case in

PR6888 with:

$ llvm-as t.ll
llvm-as: t.ll:2:29: error: expected metadata or 'align'
 store <3 x i32> %x, i32 1, i32 1>, <3 x i32>* %p
                            ^

instead of:

$ llvm-as t.ll 
llvm-as: 

llvm-svn: 102154
This commit is contained in:
Chris Lattner 2010-04-23 00:50:50 +00:00
parent 85dd1e42b6
commit ac3d4d15a4

View File

@ -1170,10 +1170,10 @@ bool LLParser::ParseOptionalCommaAlign(unsigned &Alignment,
return false;
}
if (Lex.getKind() == lltok::kw_align) {
if (ParseOptionalAlignment(Alignment)) return true;
} else
return true;
if (Lex.getKind() != lltok::kw_align)
return Error(Lex.getLoc(), "expected metadata or 'align'");
if (ParseOptionalAlignment(Alignment)) return true;
}
return false;