[meta] Make Instruction name/doc Strings so they can be automatically generated;

This commit is contained in:
Benjamin Bouvier
2019-04-30 18:14:40 +02:00
parent 22a6823496
commit feb90e376a
3 changed files with 15 additions and 14 deletions

View File

@@ -565,7 +565,7 @@ fn gen_opcodes<'a>(
// Generate an opcode hash table for looking up opcodes by name.
let hash_table =
constant_hash::generate_table(&all_inst, |inst| constant_hash::simple_hash(inst.name));
constant_hash::generate_table(&all_inst, |inst| constant_hash::simple_hash(&inst.name));
fmtln!(
fmt,
"const OPCODE_HASH_TABLE: [Option<Opcode>; {}] = [",