@@ -171,7 +171,7 @@ class X86FoldTablesEmitter {
171
171
// the appropriate flags - then adds it to Table.
172
172
void addEntryWithFlags (FoldTable &Table, const CodeGenInstruction *RegInst,
173
173
const CodeGenInstruction *MemInst, uint16_t S,
174
- unsigned FoldedIdx, bool isManual );
174
+ unsigned FoldedIdx, bool IsManual );
175
175
176
176
// Print the given table as a static const C++ array of type
177
177
// X86FoldTableEntry.
@@ -391,8 +391,10 @@ void X86FoldTablesEmitter::addEntryWithFlags(FoldTable &Table,
391
391
const CodeGenInstruction *RegInst,
392
392
const CodeGenInstruction *MemInst,
393
393
uint16_t S, unsigned FoldedIdx,
394
- bool isManual ) {
394
+ bool IsManual ) {
395
395
396
+ assert ((IsManual || Table.find (RegInst) == Table.end ()) &&
397
+ " Override entry unexpectedly" );
396
398
X86FoldTableEntry Result = X86FoldTableEntry (RegInst, MemInst);
397
399
Record *RegRec = RegInst->TheDef ;
398
400
Record *MemRec = MemInst->TheDef ;
@@ -402,7 +404,7 @@ void X86FoldTablesEmitter::addEntryWithFlags(FoldTable &Table,
402
404
Result.FoldLoad = S & TB_FOLDED_LOAD;
403
405
Result.FoldStore = S & TB_FOLDED_STORE;
404
406
Result.Alignment = Align (1ULL << ((S & TB_ALIGN_MASK) >> TB_ALIGN_SHIFT));
405
- if (isManual ) {
407
+ if (IsManual ) {
406
408
Table[RegInst] = Result;
407
409
return ;
408
410
}
0 commit comments