]> granicus.if.org Git - llvm/commit
Prevent out of order HashDirective lexing in AsmLexer.
authorNirav Dave <niravd@google.com>
Mon, 3 Oct 2016 13:48:27 +0000 (13:48 +0000)
committerNirav Dave <niravd@google.com>
Mon, 3 Oct 2016 13:48:27 +0000 (13:48 +0000)
commit3e3a0a03072fe503d46cb60a53debc40358d55d8
tree8ee05000ec5e1feb0a3be946fa66e61fe1f03dc3
parent510a4bca2ef457821794453bdf20ad4dbe2ba23c
Prevent out of order HashDirective lexing in AsmLexer.

Retrying after buildbot reset.

To lex hash directives we peek ahead to find component tokens, create a
unified token, and unlex the peeked tokens so the parser does not need
to parse the tokens then. Make sure we do not to lex another hash
directive during peek operation.

This fixes PR28921.

Reviewers: rnk, loladiro

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D24839

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283111 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCParser/AsmLexer.h
lib/MC/MCParser/AsmLexer.cpp
test/MC/AsmParser/pr28921.s [new file with mode: 0644]