@@ -1721,7 +1721,8 @@ bool SDTypeConstraint::ApplyTypeConstraint(TreePatternNode &N,
17211721// Update the node type to match an instruction operand or result as specified
17221722// in the ins or outs lists on the instruction definition. Return true if the
17231723// type was actually changed.
1724- bool TreePatternNode::UpdateNodeTypeFromInst (unsigned ResNo, Record *Operand,
1724+ bool TreePatternNode::UpdateNodeTypeFromInst (unsigned ResNo,
1725+ const Record *Operand,
17251726 TreePattern &TP) {
17261727 // The 'unknown' operand indicates that types should be inferred from the
17271728 // context.
@@ -1741,7 +1742,7 @@ bool TreePatternNode::UpdateNodeTypeFromInst(unsigned ResNo, Record *Operand,
17411742
17421743 // Both RegisterClass and RegisterOperand operands derive their types from a
17431744 // register class def.
1744- Record *RC = nullptr ;
1745+ const Record *RC = nullptr ;
17451746 if (Operand->isSubClassOf (" RegisterClass" ))
17461747 RC = Operand;
17471748 else if (Operand->isSubClassOf (" RegisterOperand" ))
@@ -1891,7 +1892,7 @@ static unsigned GetNumNodeResults(Record *Operator, CodeGenDAGPatterns &CDP) {
18911892
18921893 // Subtract any defaulted outputs.
18931894 for (unsigned i = 0 ; i != InstInfo.Operands .NumDefs ; ++i) {
1894- Record *OperandNode = InstInfo.Operands [i].Rec ;
1895+ const Record *OperandNode = InstInfo.Operands [i].Rec ;
18951896
18961897 if (OperandNode->isSubClassOf (" OperandWithDefaultOps" ) &&
18971898 !CDP.getDefaultOperand (OperandNode).DefaultOps .empty ())
@@ -2627,7 +2628,7 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) {
26272628 unsigned ChildNo = 0 ;
26282629 assert (NumResults <= NumFixedOperands);
26292630 for (unsigned i = NumResults, e = NumFixedOperands; i != e; ++i) {
2630- Record *OperandNode = InstInfo.Operands [i].Rec ;
2631+ const Record *OperandNode = InstInfo.Operands [i].Rec ;
26312632
26322633 // If the operand has a default value, do we use it? We must use the
26332634 // default if we've run out of children of the pattern DAG to consume,
@@ -3807,7 +3808,7 @@ void CodeGenDAGPatterns::parseInstructionPattern(CodeGenInstruction &CGI,
38073808 assert (I.getArgList ().empty () && " Args list should still be empty here!" );
38083809
38093810 // Check that all of the results occur first in the list.
3810- std::vector<Record *> Results;
3811+ std::vector<const Record *> Results;
38113812 std::vector<unsigned > ResultIndices;
38123813 SmallVector<TreePatternNodePtr, 2 > ResNodes;
38133814 for (unsigned i = 0 ; i != NumResults; ++i) {
@@ -3853,7 +3854,7 @@ void CodeGenDAGPatterns::parseInstructionPattern(CodeGenInstruction &CGI,
38533854
38543855 // Loop over the inputs next.
38553856 std::vector<TreePatternNodePtr> ResultNodeOperands;
3856- std::vector<Record *> Operands;
3857+ std::vector<const Record *> Operands;
38573858 for (unsigned i = NumResults, e = CGI.Operands .size (); i != e; ++i) {
38583859 CGIOperandList::OperandInfo &Op = CGI.Operands [i];
38593860 const std::string &OpName = Op.Name ;
@@ -3961,8 +3962,8 @@ void CodeGenDAGPatterns::ParseInstructions() {
39613962 // is from a multiclass expansion w/ a SDPatternOperator passed in as
39623963 // null_frag.
39633964 if (!LI || LI->empty () || hasNullFragReference (LI)) {
3964- std::vector<Record *> Results;
3965- std::vector<Record *> Operands;
3965+ std::vector<const Record *> Results;
3966+ std::vector<const Record *> Operands;
39663967
39673968 CodeGenInstruction &InstInfo = Target.getInstruction (Instr);
39683969
0 commit comments