@@ -63,8 +63,8 @@ static bool isExplicitUnalign(const CodeGenInstruction *Inst) {
6363}
6464
6565class X86FoldTablesEmitter {
66- RecordKeeper &Records;
67- CodeGenTarget Target;
66+ const RecordKeeper &Records;
67+ const CodeGenTarget Target;
6868
6969 // Represents an entry in the folding table
7070 class X86FoldTableEntry {
@@ -196,7 +196,7 @@ class X86FoldTablesEmitter {
196196 FoldTable BroadcastTable4;
197197
198198public:
199- X86FoldTablesEmitter (RecordKeeper &R) : Records(R), Target(R) {}
199+ X86FoldTablesEmitter (const RecordKeeper &R) : Records(R), Target(R) {}
200200
201201 // run - Generate the 6 X86 memory fold tables.
202202 void run (raw_ostream &OS);
@@ -670,7 +670,7 @@ void X86FoldTablesEmitter::run(raw_ostream &OS) {
670670 // added into memory fold tables.
671671 auto RegInstsForBroadcast = RegInsts;
672672
673- Record *AsmWriter = Target.getAsmWriter ();
673+ const Record *AsmWriter = Target.getAsmWriter ();
674674 unsigned Variant = AsmWriter->getValueAsInt (" Variant" );
675675 auto FixUp = [&](const CodeGenInstruction *RegInst) {
676676 StringRef RegInstName = RegInst->TheDef ->getName ();
@@ -721,8 +721,8 @@ void X86FoldTablesEmitter::run(raw_ostream &OS) {
721721
722722 // Add the manually mapped instructions listed above.
723723 for (const ManualMapEntry &Entry : ManualMapSet) {
724- Record *RegInstIter = Records.getDef (Entry.RegInstStr );
725- Record *MemInstIter = Records.getDef (Entry.MemInstStr );
724+ const Record *RegInstIter = Records.getDef (Entry.RegInstStr );
725+ const Record *MemInstIter = Records.getDef (Entry.MemInstStr );
726726
727727 updateTables (&(Target.getInstruction (RegInstIter)),
728728 &(Target.getInstruction (MemInstIter)), Entry.Strategy , true );
0 commit comments