aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCParser/AsmLexer.cpp
diff options
context:
space:
mode:
authorColin LeMahieu <colinl@codeaurora.org>2016-03-18 18:22:07 +0000
committerColin LeMahieu <colinl@codeaurora.org>2016-03-18 18:22:07 +0000
commit01431465144de9f12ecdff4fe27d5bbdb767cbca (patch)
tree24ceed5d51843b752c73e63a0b58d9551da1d5f7 /llvm/lib/MC/MCParser/AsmLexer.cpp
parent69082f051d678e662b922b5424c0db88eb08e791 (diff)
downloadllvm-01431465144de9f12ecdff4fe27d5bbdb767cbca.zip
llvm-01431465144de9f12ecdff4fe27d5bbdb767cbca.tar.gz
llvm-01431465144de9f12ecdff4fe27d5bbdb767cbca.tar.bz2
[MCParser] Accept uppercase radix variants 0X and 0B
Differential Revision: http://reviews.llvm.org/D14781 llvm-svn: 263802
Diffstat (limited to 'llvm/lib/MC/MCParser/AsmLexer.cpp')
-rw-r--r--llvm/lib/MC/MCParser/AsmLexer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCParser/AsmLexer.cpp b/llvm/lib/MC/MCParser/AsmLexer.cpp
index 424c8ae..9b057c2 100644
--- a/llvm/lib/MC/MCParser/AsmLexer.cpp
+++ b/llvm/lib/MC/MCParser/AsmLexer.cpp
@@ -284,7 +284,7 @@ AsmToken AsmLexer::LexDigit() {
return intToken(Result, Value);
}
- if (*CurPtr == 'b') {
+ if ((*CurPtr == 'b') || (*CurPtr == 'B')) {
++CurPtr;
// See if we actually have "0b" as part of something like "jmp 0b\n"
if (!isdigit(CurPtr[0])) {
@@ -313,7 +313,7 @@ AsmToken AsmLexer::LexDigit() {
return intToken(Result, Value);
}
- if (*CurPtr == 'x') {
+ if ((*CurPtr == 'x') || (*CurPtr == 'X')) {
++CurPtr;
const char *NumStart = CurPtr;
while (isxdigit(CurPtr[0]))