[meta] Remove OperandKind::name field and explicitly pass rust_field_name/rust_type; (fixes #1177)

This commit is contained in:
Benjamin Bouvier
2019-10-29 15:46:06 +01:00
parent 0eb2dfc4a3
commit d5e990220e
9 changed files with 123 additions and 170 deletions

View File

@@ -93,10 +93,7 @@ impl EncodingBuilder {
{
let immediate_predicate = InstructionPredicate::new_is_field_equal(
&inst.inst.format,
immediate_operand
.kind
.rust_field_name()
.expect("Immediates must always have a field name."),
immediate_operand.kind.rust_field_name,
immediate_value.to_string(),
);
inst_predicate = if let Some(type_predicate) = inst_predicate {