[PATCH] D67840: Cosmetic; don't use the magic constant 35 when HASH is more readable. This matches other MCK__<THING>_* usage better.
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 23 05:53:28 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL372599: Cosmetic; don't use the magic constant 35 when HASH is more readable. This… (authored by markrvmurray, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D67840?vs=221049&id=221311#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67840/new/
https://reviews.llvm.org/D67840
Files:
llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
Index: llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
===================================================================
--- llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+++ llvm/trunk/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
@@ -5535,43 +5535,43 @@
switch (Kind) {
default:
return Match_InvalidOperand;
- case MCK__35_0:
+ case MCK__HASH_0:
ExpectedVal = 0;
break;
- case MCK__35_1:
+ case MCK__HASH_1:
ExpectedVal = 1;
break;
- case MCK__35_12:
+ case MCK__HASH_12:
ExpectedVal = 12;
break;
- case MCK__35_16:
+ case MCK__HASH_16:
ExpectedVal = 16;
break;
- case MCK__35_2:
+ case MCK__HASH_2:
ExpectedVal = 2;
break;
- case MCK__35_24:
+ case MCK__HASH_24:
ExpectedVal = 24;
break;
- case MCK__35_3:
+ case MCK__HASH_3:
ExpectedVal = 3;
break;
- case MCK__35_32:
+ case MCK__HASH_32:
ExpectedVal = 32;
break;
- case MCK__35_4:
+ case MCK__HASH_4:
ExpectedVal = 4;
break;
- case MCK__35_48:
+ case MCK__HASH_48:
ExpectedVal = 48;
break;
- case MCK__35_6:
+ case MCK__HASH_6:
ExpectedVal = 6;
break;
- case MCK__35_64:
+ case MCK__HASH_64:
ExpectedVal = 64;
break;
- case MCK__35_8:
+ case MCK__HASH_8:
ExpectedVal = 8;
break;
}
Index: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
===================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -11806,19 +11806,19 @@
// immediate in the syntax.
switch (Kind) {
default: break;
- case MCK__35_0:
+ case MCK__HASH_0:
if (Op.isImm())
if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Op.getImm()))
if (CE->getValue() == 0)
return Match_Success;
break;
- case MCK__35_8:
+ case MCK__HASH_8:
if (Op.isImm())
if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Op.getImm()))
if (CE->getValue() == 8)
return Match_Success;
break;
- case MCK__35_16:
+ case MCK__HASH_16:
if (Op.isImm())
if (const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(Op.getImm()))
if (CE->getValue() == 16)
Index: llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
===================================================================
--- llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
+++ llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
@@ -1111,6 +1111,7 @@
case '<': Res += "_LT_"; break;
case '>': Res += "_GT_"; break;
case '-': Res += "_MINUS_"; break;
+ case '#': Res += "_HASH_"; break;
default:
if ((*it >= 'A' && *it <= 'Z') ||
(*it >= 'a' && *it <= 'z') ||
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67840.221311.patch
Type: text/x-patch
Size: 2784 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190923/6013882b/attachment.bin>
More information about the llvm-commits
mailing list