remove the style changes in nac3core/src/codegen/mod.rs

This commit is contained in:
z78078 2022-07-04 16:35:17 +08:00
parent 8fb413a7bb
commit c0e035f2f8
1 changed files with 1 additions and 3 deletions

View File

@ -150,12 +150,10 @@ impl WorkerRegistry {
}); });
let mut handles = Vec::new(); let mut handles = Vec::new();
for mut generator in generators.into_iter() { for mut generator in generators.into_iter() {
let registry = registry.clone(); let registry = registry.clone();
let registry2 = registry.clone(); let registry2 = registry.clone();
let f = f.clone(); let f = f.clone();
let handle = thread::spawn(move || { let handle = thread::spawn(move || {
registry.worker_thread(generator.as_mut(), f); registry.worker_thread(generator.as_mut(), f);
}); });
@ -228,7 +226,6 @@ impl WorkerRegistry {
let passes = PassManager::create(&module); let passes = PassManager::create(&module);
// HACK: This critical section is a work-around for issue // HACK: This critical section is a work-around for issue
// https://git.m-labs.hk/M-Labs/nac3/issues/275 // https://git.m-labs.hk/M-Labs/nac3/issues/275
{ {
@ -259,6 +256,7 @@ impl WorkerRegistry {
if !errors.is_empty() { if !errors.is_empty() {
panic!("Codegen error: {}", errors.into_iter().sorted().join("\n----------\n")); panic!("Codegen error: {}", errors.into_iter().sorted().join("\n----------\n"));
} }
let result = module.verify(); let result = module.verify();
if let Err(err) = result { if let Err(err) = result {
println!("{}", module.print_to_string().to_str().unwrap()); println!("{}", module.print_to_string().to_str().unwrap());