summaryrefslogtreecommitdiff
path: root/llvm/utils/TableGen/CallingConvEmitter.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/CallingConvEmitter.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/CallingConvEmitter.cpp')
-rw-r--r--llvm/utils/TableGen/CallingConvEmitter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/utils/TableGen/CallingConvEmitter.cpp b/llvm/utils/TableGen/CallingConvEmitter.cpp
index 2b20b854a9b1..369238dd70f7 100644
--- a/llvm/utils/TableGen/CallingConvEmitter.cpp
+++ b/llvm/utils/TableGen/CallingConvEmitter.cpp
@@ -271,9 +271,9 @@ void CallingConvEmitter::emitAction(const Record *Action, indent Indent,
O << Indent << "return false;\n";
} else if (Action->isSubClassOf("CCPromoteToType")) {
const Record *DestTy = Action->getValueAsDef("DestTy");
- MVT::SimpleValueType DestVT = getValueType(DestTy);
+ MVT DestVT = getValueType(DestTy);
O << Indent << "LocVT = " << getEnumName(DestVT) << ";\n";
- if (MVT(DestVT).isFloatingPoint()) {
+ if (DestVT.isFloatingPoint()) {
O << Indent << "LocInfo = CCValAssign::FPExt;\n";
} else {
O << Indent << "if (ArgFlags.isSExt())\n"
@@ -285,9 +285,9 @@ void CallingConvEmitter::emitAction(const Record *Action, indent Indent,
}
} else if (Action->isSubClassOf("CCPromoteToUpperBitsInType")) {
const Record *DestTy = Action->getValueAsDef("DestTy");
- MVT::SimpleValueType DestVT = getValueType(DestTy);
+ MVT DestVT = getValueType(DestTy);
O << Indent << "LocVT = " << getEnumName(DestVT) << ";\n";
- if (MVT(DestVT).isFloatingPoint()) {
+ if (DestVT.isFloatingPoint()) {
PrintFatalError(Action->getLoc(),
"CCPromoteToUpperBitsInType does not handle floating "
"point");