Skip to content

Commit

Permalink
The module file isn't needed for generated code anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
jblebrun committed Jan 23, 2024
1 parent 71d1f79 commit c5ec53f
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions codegen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,6 @@ pub fn generate_exec_code() -> io::Result<()> {
read_instruction_list("../codegen/master_simd_ops_list.csv", Variant::Simd)?,
];

// Emit the module wrapping the various generated items.
emit_module(out)?;

// Emit the file containing the code and descriptor structs.
let mut code_file = new_output_file(format!("{out}/instruction_code.rs")).unwrap();
code_file.emit_code_file(inst_groups)?;
Expand All @@ -188,17 +185,6 @@ fn new_output_file(name: impl AsRef<str>) -> io::Result<fs::File> {
Ok(f)
}

fn emit_module(out: &str) -> io::Result<()> {
let mut f = new_output_file(format!("{out}/instruction_mod.rs"))?;
f.write_all(GEN_HEADER)?;
f.write_all(MODULE)
}

pub static MODULE: &[u8] = br#"pub mod data_table;
pub mod exec_table;
pub mod instructions;
"#;

pub static GEN_HEADER: &[u8] = br#"/// This file was generated automatically by the codegen crate.
/// Do not edit it manually.
///
Expand Down

0 comments on commit c5ec53f

Please sign in to comment.