@@ -22,10 +22,10 @@ using namespace llvm;
22
22
namespace {
23
23
24
24
class X86MnemonicTablesEmitter {
25
- CodeGenTarget Target;
25
+ const CodeGenTarget Target;
26
26
27
27
public:
28
- X86MnemonicTablesEmitter (RecordKeeper &R) : Target(R) {}
28
+ X86MnemonicTablesEmitter (const RecordKeeper &R) : Target(R) {}
29
29
30
30
// Output X86 mnemonic tables.
31
31
void run (raw_ostream &OS);
@@ -34,15 +34,13 @@ class X86MnemonicTablesEmitter {
34
34
void X86MnemonicTablesEmitter::run (raw_ostream &OS) {
35
35
emitSourceFileHeader (" X86 Mnemonic tables" , OS);
36
36
OS << " namespace llvm {\n namespace X86 {\n\n " ;
37
- Record *AsmWriter = Target.getAsmWriter ();
37
+ const Record *AsmWriter = Target.getAsmWriter ();
38
38
unsigned Variant = AsmWriter->getValueAsInt (" Variant" );
39
39
40
40
// Hold all instructions grouped by mnemonic
41
41
StringMap<SmallVector<const CodeGenInstruction *, 0 >> MnemonicToCGInstrMap;
42
42
43
- ArrayRef<const CodeGenInstruction *> NumberedInstructions =
44
- Target.getInstructionsByEnumValue ();
45
- for (const CodeGenInstruction *I : NumberedInstructions) {
43
+ for (const CodeGenInstruction *I : Target.getInstructionsByEnumValue ()) {
46
44
const Record *Def = I->TheDef ;
47
45
// Filter non-X86 instructions.
48
46
if (!Def->isSubClassOf (" X86Inst" ))
0 commit comments