diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-09-11 20:57:04 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-09-11 20:57:04 +0000 |
commit | aa645f78a26ca3b6faaeffa515dab1960c0cbdb1 (patch) | |
tree | 823aac46976141543eec2c64402fd9b5039a9811 | |
parent | a7b159ccdd3531853dc49dd91cf8948ce382e1c1 (diff) |
Simplify logic. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163648 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/AsmParser/X86AsmParser.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp index c89e738a8b..542cc442af 100644 --- a/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -633,15 +633,14 @@ X86Operand *X86AsmParser::ParseOperand() { /// getIntelMemOperandSize - Return intel memory operand size. static unsigned getIntelMemOperandSize(StringRef OpStr) { - unsigned Size = 0; - if (OpStr == "BYTE") Size = 8; - if (OpStr == "WORD") Size = 16; - if (OpStr == "DWORD") Size = 32; - if (OpStr == "QWORD") Size = 64; - if (OpStr == "XWORD") Size = 80; - if (OpStr == "XMMWORD") Size = 128; - if (OpStr == "YMMWORD") Size = 256; - return Size; + if (OpStr == "BYTE") return 8; + if (OpStr == "WORD") return 16; + if (OpStr == "DWORD") return 32; + if (OpStr == "QWORD") return 64; + if (OpStr == "XWORD") return 80; + if (OpStr == "XMMWORD") return 128; + if (OpStr == "YMMWORD") return 256; + return 0; } X86Operand *X86AsmParser::ParseIntelBracExpression(unsigned SegReg, |