ARM assembly, accept optional '#' on lane index number.

rdar://11057160

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153053 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2012-03-19 20:39:53 +00:00
parent 1f6e3f9544
commit ceee984302

View File

@ -2905,6 +2905,12 @@ parseVectorLane(VectorLaneTy &LaneKind, unsigned &Index) {
Parser.Lex(); // Eat the ']'.
return MatchOperand_Success;
}
// There's an optional '#' token here. Normally there wouldn't be, but
// inline assemble puts one in, and it's friendly to accept that.
if (Parser.getTok().is(AsmToken::Hash))
Parser.Lex(); // Eat the '#'
const MCExpr *LaneIndex;
SMLoc Loc = Parser.getTok().getLoc();
if (getParser().ParseExpression(LaneIndex)) {