llvm.org GIT mirror llvm / 0b0d3bf
Cosmetic; don't use the magic constant 35 when HASH is more readable. This matches other MCK__<THING>_* usage better. Summary: No functional change. This fixes a magic constant in MCK__*_... macros only. Reviewers: ostannard Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67840 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372599 91177308-0d34-0410-b5e6-96231b3b80d8 Mark Murray 10 months ago
3 changed file(s) with 17 addition(s) and 16 deletion(s). Raw diff Collapse all Expand all
55345534 switch (Kind) {
55355535 default:
55365536 return Match_InvalidOperand;
5537 case MCK__35_0:
5537 case MCK__HASH_0:
55385538 ExpectedVal = 0;
55395539 break;
5540 case MCK__35_1:
5540 case MCK__HASH_1:
55415541 ExpectedVal = 1;
55425542 break;
5543 case MCK__35_12:
5543 case MCK__HASH_12:
55445544 ExpectedVal = 12;
55455545 break;
5546 case MCK__35_16:
5546 case MCK__HASH_16:
55475547 ExpectedVal = 16;
55485548 break;
5549 case MCK__35_2:
5549 case MCK__HASH_2:
55505550 ExpectedVal = 2;
55515551 break;
5552 case MCK__35_24:
5552 case MCK__HASH_24:
55535553 ExpectedVal = 24;
55545554 break;
5555 case MCK__35_3:
5555 case MCK__HASH_3:
55565556 ExpectedVal = 3;
55575557 break;
5558 case MCK__35_32:
5558 case MCK__HASH_32:
55595559 ExpectedVal = 32;
55605560 break;
5561 case MCK__35_4:
5561 case MCK__HASH_4:
55625562 ExpectedVal = 4;
55635563 break;
5564 case MCK__35_48:
5564 case MCK__HASH_48:
55655565 ExpectedVal = 48;
55665566 break;
5567 case MCK__35_6:
5567 case MCK__HASH_6:
55685568 ExpectedVal = 6;
55695569 break;
5570 case MCK__35_64:
5570 case MCK__HASH_64:
55715571 ExpectedVal = 64;
55725572 break;
5573 case MCK__35_8:
5573 case MCK__HASH_8:
55745574 ExpectedVal = 8;
55755575 break;
55765576 }
1180511805 // immediate in the syntax.
1180611806 switch (Kind) {
1180711807 default: break;
11808 case MCK__35_0:
11808 case MCK__HASH_0:
1180911809 if (Op.isImm())
1181011810 if (const MCConstantExpr *CE = dyn_cast(Op.getImm()))
1181111811 if (CE->getValue() == 0)
1181211812 return Match_Success;
1181311813 break;
11814 case MCK__35_8:
11814 case MCK__HASH_8:
1181511815 if (Op.isImm())
1181611816 if (const MCConstantExpr *CE = dyn_cast(Op.getImm()))
1181711817 if (CE->getValue() == 8)
1181811818 return Match_Success;
1181911819 break;
11820 case MCK__35_16:
11820 case MCK__HASH_16:
1182111821 if (Op.isImm())
1182211822 if (const MCConstantExpr *CE = dyn_cast(Op.getImm()))
1182311823 if (CE->getValue() == 16)
11101110 case '<': Res += "_LT_"; break;
11111111 case '>': Res += "_GT_"; break;
11121112 case '-': Res += "_MINUS_"; break;
1113 case '#': Res += "_HASH_"; break;
11131114 default:
11141115 if ((*it >= 'A' && *it <= 'Z') ||
11151116 (*it >= 'a' && *it <= 'z') ||