Use CGU name as LLVM module name and add some caching to CGU name generation.
This commit is contained in:
parent
e192e498ab
commit
d662083a6c
9 changed files with 207 additions and 169 deletions
|
@ -728,7 +728,7 @@ unsafe fn codegen(cgcx: &CodegenContext,
|
|||
|
||||
if config.emit_bc_compressed {
|
||||
let dst = bc_out.with_extension(RLIB_BYTECODE_EXTENSION);
|
||||
let data = bytecode::encode(&module.llmod_id, data);
|
||||
let data = bytecode::encode(&module.name, data);
|
||||
if let Err(e) = fs::write(&dst, data) {
|
||||
diag_handler.err(&format!("failed to write bytecode: {}", e));
|
||||
}
|
||||
|
@ -1338,7 +1338,6 @@ fn execute_work_item(cgcx: &CodegenContext,
|
|||
assert_eq!(bytecode_compressed.is_some(), config.emit_bc_compressed);
|
||||
|
||||
Ok(WorkItemResult::Compiled(CompiledModule {
|
||||
llmod_id: module.llmod_id.clone(),
|
||||
name: module_name,
|
||||
kind: ModuleKind::Regular,
|
||||
pre_existing: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue