Use CGU name as LLVM module name and add some caching to CGU name generation.

This commit is contained in:
Michael Woerister 2018-08-14 17:55:22 +02:00
parent e192e498ab
commit d662083a6c
9 changed files with 207 additions and 169 deletions

View file

@ -269,8 +269,8 @@ struct ModuleCodegen {
/// unique amongst **all** crates. Therefore, it should contain
/// something unique to this crate (e.g., a module path) as well
/// as the crate name and disambiguator.
/// We currently generate these names via CodegenUnit::build_cgu_name().
name: String,
llmod_id: String,
source: ModuleSource,
kind: ModuleKind,
}
@ -317,7 +317,6 @@ impl ModuleCodegen {
};
CompiledModule {
llmod_id: self.llmod_id,
name: self.name.clone(),
kind: self.kind,
pre_existing,
@ -331,7 +330,6 @@ impl ModuleCodegen {
#[derive(Debug)]
struct CompiledModule {
name: String,
llmod_id: String,
kind: ModuleKind,
pre_existing: bool,
object: Option<PathBuf>,