diff options
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.cpp')
-rw-r--r-- | llvm/utils/TableGen/CodeGenDAGPatterns.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp index 2d0694d..4a247050 100644 --- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp @@ -1632,12 +1632,12 @@ bool SDTypeConstraint::ApplyTypeConstraint(TreePatternNode *N, // have an integer type that is smaller than the VT. if (!NodeToApply->isLeaf() || !isa<DefInit>(NodeToApply->getLeafValue()) || - !static_cast<DefInit*>(NodeToApply->getLeafValue())->getDef() + !cast<DefInit>(NodeToApply->getLeafValue())->getDef() ->isSubClassOf("ValueType")) { TP.error(N->getOperator()->getName() + " expects a VT operand!"); return false; } - DefInit *DI = static_cast<DefInit*>(NodeToApply->getLeafValue()); + DefInit *DI = cast<DefInit>(NodeToApply->getLeafValue()); const CodeGenTarget &T = TP.getDAGPatterns().getTargetInfo(); auto VVT = getValueTypeByHwMode(DI->getDef(), T.getHwModes()); TypeSetByHwMode TypeListTmp(VVT); @@ -3832,7 +3832,7 @@ void CodeGenDAGPatterns::parseInstructionPattern( InstInputs.erase(OpName); // It occurred, remove from map. if (InVal->isLeaf() && isa<DefInit>(InVal->getLeafValue())) { - Record *InRec = static_cast<DefInit*>(InVal->getLeafValue())->getDef(); + Record *InRec = cast<DefInit>(InVal->getLeafValue())->getDef(); if (!checkOperandClass(Op, InRec)) I.error("Operand $" + OpName + "'s register class disagrees" " between the operand and pattern"); |