summaryrefslogtreecommitdiff
path: root/llvm/utils/TableGen/SDNodeInfoEmitter.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2025-11-22 17:00:56 -0800
committerGitHub <noreply@github.com>2025-11-22 17:00:56 -0800
commit0ef522ff68fff4266bf85e7b7a507a16a8fd34ee (patch)
treeafc7839155ed8580ff234b0d93d4c5383be841c7 /llvm/utils/TableGen/SDNodeInfoEmitter.cpp
parent0619292195ecd47ac05b0c7759992b400abec52c (diff)
[TableGen] Use MVT instead of MVT::SimpleValueType. NFC (#169180)
This improves type safety and is less verbose. Use SimpleTy only where an integer is needed like switches or emitting a VBR. --------- Co-authored-by: Sergei Barannikov <barannikov88@gmail.com>
Diffstat (limited to 'llvm/utils/TableGen/SDNodeInfoEmitter.cpp')
-rw-r--r--llvm/utils/TableGen/SDNodeInfoEmitter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/SDNodeInfoEmitter.cpp b/llvm/utils/TableGen/SDNodeInfoEmitter.cpp
index 5dff3862fa30..0f2f1178bf93 100644
--- a/llvm/utils/TableGen/SDNodeInfoEmitter.cpp
+++ b/llvm/utils/TableGen/SDNodeInfoEmitter.cpp
@@ -201,7 +201,7 @@ static void emitTypeConstraint(
unsigned OtherOpNo = 0;
unsigned NumHwModes = 0;
unsigned VTByHwModeOffset = 0;
- MVT::SimpleValueType VT = MVT::INVALID_SIMPLE_VALUE_TYPE;
+ MVT VT = MVT::INVALID_SIMPLE_VALUE_TYPE;
switch (C.ConstraintType) {
case SDTypeConstraint::SDTCisVT:
@@ -212,7 +212,7 @@ static void emitTypeConstraint(
[[fallthrough]];
case SDTypeConstraint::SDTCVecEltisVT:
if (C.VVT.isSimple()) {
- VT = C.VVT.getSimple().SimpleTy;
+ VT = C.VVT.getSimple();
} else {
NumHwModes = C.VVT.size();
assert(NumHwModes && "Empty type set?");