MC: Add AsmLexer::BigNum token for integers greater than 64 bits
authorDavid Woodhouse <dwmw2@infradead.org>
Sat, 1 Feb 2014 16:20:54 +0000 (16:20 +0000)
committerDavid Woodhouse <dwmw2@infradead.org>
Sat, 1 Feb 2014 16:20:54 +0000 (16:20 +0000)
commitaac8e4e3f332c8be2b1049f892549a367d902919
tree8b40650f4f8cbc788cde162373d937d0db2b304d
parent115fd30b245065324193baefe418cd7e6b429488
MC: Add AsmLexer::BigNum token for integers greater than 64 bits

This will be needed for .octa support, but we don't want to just use the
existing AsmLexer::Integer for it and then have to litter all its users
with explicit checks for the size, and make them use the new get APIntVal()
method.

So let the lexer produce an AsmLexer::Integer as before for numbers which
are small enough — which appears to cover what was previously a nasty
special case handling of numbers which don't fit in int64_t but *do* fit
in uint64_t.

Where the number is too large even for that, produce an AsmLexer::BigNum
instead. We do nothing with these except complain about them for now,
but that will be changed shortly...

Based on a patch from PaX Team <pageexec@freemail.hu>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200613 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCParser/MCAsmLexer.h
lib/MC/MCParser/AsmLexer.cpp
lib/MC/MCParser/AsmParser.cpp