diff --git a/.gitignore b/.gitignore index 71ab9a4..4709b0c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,8 @@ target/ **/*.rs.bk # MSVC Windows builds of rustc generate these, which store debugging information -*.pdb \ No newline at end of file +*.pdb + +# Generated by the compiler +/*.cpp +/*.out \ No newline at end of file diff --git a/crates/codegen/src/cpp.rs b/crates/codegen/src/cpp.rs index 6778a88..172d9e0 100644 --- a/crates/codegen/src/cpp.rs +++ b/crates/codegen/src/cpp.rs @@ -22,6 +22,8 @@ impl Codegen { } pub fn gen(&mut self, irs: Vec) { + self.emit(format!("// Auto-generated by hazure compiler version {}\n", env!("CARGO_PKG_VERSION"))); + for module in MODULE_INCLUDES { self.emit(format!("#include {}\n", module)); }