diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-09-12 18:24:26 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-09-12 18:24:26 +0000 |
commit | f58ae5dfc1c939e34e660a21b4ea7d192a37a322 (patch) | |
tree | d1822059b392a6b694b39a7fe607fd7fd0cd7a0f /lib | |
parent | a562dc7228990797a259f4fef4acb95a83b23e0d (diff) |
[ms-inline asm] Make the operand size directives case insensitive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163729 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/X86/AsmParser/X86AsmParser.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp index 0321794bcc..e4c883f345 100644 --- a/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -634,13 +634,13 @@ X86Operand *X86AsmParser::ParseOperand() { /// getIntelMemOperandSize - Return intel memory operand size. static unsigned getIntelMemOperandSize(StringRef OpStr) { unsigned Size = StringSwitch<unsigned>(OpStr) - .Case("BYTE", 8) - .Case("WORD", 16) - .Case("DWORD", 32) - .Case("QWORD", 64) - .Case("XWORD", 80) - .Case("XMMWORD", 128) - .Case("YMMWORD", 256) + .Cases("BYTE", "byte", 8) + .Cases("WORD", "word", 16) + .Cases("DWORD", "dword", 32) + .Cases("QWORD", "qword", 64) + .Cases("XWORD", "xword", 80) + .Cases("XMMWORD", "xmmword", 128) + .Cases("YMMWORD", "ymmword", 256) .Default(0); return Size; } @@ -744,7 +744,8 @@ X86Operand *X86AsmParser::ParseIntelMemOperand() { unsigned Size = getIntelMemOperandSize(Tok.getString()); if (Size) { Parser.Lex(); - assert (Tok.getString() == "PTR" && "Unexpected token!"); + assert ((Tok.getString() == "PTR" || Tok.getString() == "ptr") && + "Unexpected token!"); Parser.Lex(); } |