@@ -318,11 +318,10 @@ Record *MapTableEmitter::getInstrForColumn(Record *KeyInstr,
318
318
ListInit *ColFields = InstrMapDesc.getColFields ();
319
319
Record *MatchInstr = nullptr ;
320
320
321
- for (unsigned i = 0 , e = RelatedInstrVec. size (); i < e; i++ ) {
321
+ for (llvm::Record *CurInstr : RelatedInstrVec) {
322
322
bool MatchFound = true ;
323
- Record *CurInstr = RelatedInstrVec[i];
324
323
for (unsigned j = 0 , endCF = ColFields->size ();
325
- (j < endCF) && MatchFound; j++) {
324
+ (j < endCF) && MatchFound; j++) {
326
325
Init *ColFieldJ = ColFields->getElement (j);
327
326
Init *CurInstrInit = CurInstr->getValue (ColFieldJ)->getValue ();
328
327
std::string CurInstrVal = CurInstrInit->getAsUnquotedString ();
@@ -342,8 +341,9 @@ Record *MapTableEmitter::getInstrForColumn(Record *KeyInstr,
342
341
}
343
342
344
343
PrintFatalError (" Multiple matches found for `" + KeyInstr->getName () +
345
- " ', for the relation `" + InstrMapDesc.getName () + " ', row fields [" +
346
- KeyValueStr + " ], column `" + CurValueCol->getAsString () + " '" );
344
+ " ', for the relation `" + InstrMapDesc.getName () +
345
+ " ', row fields [" + KeyValueStr + " ], column `" +
346
+ CurValueCol->getAsString () + " '" );
347
347
}
348
348
MatchInstr = CurInstr;
349
349
}
0 commit comments