@@ -653,24 +653,24 @@ void CompressInstEmitter::emitCompressInstEmitter(raw_ostream &OS,
653
653
.str ()
654
654
: " " ;
655
655
656
- for (auto &CompressPat : CompressPatterns) {
656
+ for (const auto &CompressPat : CompressPatterns) {
657
657
if (EType == EmitterType::Uncompress && CompressPat.IsCompressOnly )
658
658
continue ;
659
659
660
660
std::string CondString;
661
661
std::string CodeString;
662
662
raw_string_ostream CondStream (CondString);
663
663
raw_string_ostream CodeStream (CodeString);
664
- CodeGenInstruction &Source =
664
+ const CodeGenInstruction &Source =
665
665
CompressOrCheck ? CompressPat.Source : CompressPat.Dest ;
666
- CodeGenInstruction &Dest =
666
+ const CodeGenInstruction &Dest =
667
667
CompressOrCheck ? CompressPat.Dest : CompressPat.Source ;
668
- IndexedMap<OpData> SourceOperandMap = CompressOrCheck
669
- ? CompressPat.SourceOperandMap
670
- : CompressPat.DestOperandMap ;
671
- IndexedMap<OpData> &DestOperandMap = CompressOrCheck
672
- ? CompressPat.DestOperandMap
673
- : CompressPat.SourceOperandMap ;
668
+ const IndexedMap<OpData> & SourceOperandMap =
669
+ CompressOrCheck ? CompressPat.SourceOperandMap
670
+ : CompressPat.DestOperandMap ;
671
+ const IndexedMap<OpData> &DestOperandMap =
672
+ CompressOrCheck ? CompressPat.DestOperandMap
673
+ : CompressPat.SourceOperandMap ;
674
674
675
675
CurOp = Source.TheDef ->getName ();
676
676
// Check current and previous opcode to decide to continue or end a case.
0 commit comments