[meta] Remove the OperandKindBuilder;

And replace it by constructors in OperandKind. There's a single optional
parameter function `set_doc` that remains, and didn't justify the whole
OperandKindBuilder concept to exist.
This commit is contained in:
Benjamin Bouvier
2019-10-29 16:57:11 +01:00
parent d5e990220e
commit d8b840d2f5
5 changed files with 78 additions and 134 deletions

View File

@@ -1296,7 +1296,7 @@ impl Into<InstSpec> for BoundInstruction {
mod test {
use super::*;
use crate::cdsl::formats::InstructionFormatBuilder;
use crate::cdsl::operands::{OperandKindBuilder, OperandKindFields};
use crate::cdsl::operands::{OperandKind, OperandKindFields};
use crate::cdsl::typevar::TypeSetBuilder;
use crate::shared::types::Int::{I32, I64};
@@ -1304,7 +1304,7 @@ mod test {
// Pretend the index string is &'static.
let name = Box::leak(index.to_string().into_boxed_str());
// Format's name / rust_type don't matter here.
let kind = OperandKindBuilder::new(name, name, field).build();
let kind = OperandKind::new(name, name, field);
let operand = Operand::new(name, kind);
operand
}