Rename gen to gen_llvm

This way, we have gen_dev and gen_llvm representing the two
different compiler backends.
This commit is contained in:
Richard Feldman 2021-06-06 07:51:18 -04:00
parent bff91b147d
commit 57676057fa
24 changed files with 73 additions and 70 deletions

View file

@ -1,7 +1,7 @@
#[cfg(feature = "llvm")]
use roc_gen::llvm::build::module_from_builtins;
use roc_gen_llvm::llvm::build::module_from_builtins;
#[cfg(feature = "llvm")]
pub use roc_gen::llvm::build::FunctionIterator;
pub use roc_gen_llvm::llvm::build::FunctionIterator;
#[cfg(feature = "llvm")]
use roc_load::file::MonomorphizedModule;
#[cfg(feature = "llvm")]
@ -125,12 +125,12 @@ pub fn gen_from_mono_module(
}
let builder = context.create_builder();
let (dibuilder, compile_unit) = roc_gen::llvm::build::Env::new_debug_info(module);
let (mpm, _fpm) = roc_gen::llvm::build::construct_optimization_passes(module, opt_level);
let (dibuilder, compile_unit) = roc_gen_llvm::llvm::build::Env::new_debug_info(module);
let (mpm, _fpm) = roc_gen_llvm::llvm::build::construct_optimization_passes(module, opt_level);
// Compile and add all the Procs before adding main
let ptr_bytes = target.pointer_width().unwrap().bytes() as u32;
let env = roc_gen::llvm::build::Env {
let env = roc_gen_llvm::llvm::build::Env {
arena: &arena,
builder: &builder,
dibuilder: &dibuilder,
@ -143,7 +143,7 @@ pub fn gen_from_mono_module(
exposed_to_host: loaded.exposed_to_host.keys().copied().collect(),
};
roc_gen::llvm::build::build_procedures(&env, opt_level, loaded.procedures);
roc_gen_llvm::llvm::build::build_procedures(&env, opt_level, loaded.procedures);
env.dibuilder.finalize();