Add a log for unimplemented stuff
This commit is contained in:
parent
48701d758d
commit
a45f0ee6e3
2 changed files with 10 additions and 4 deletions
|
@ -242,12 +242,15 @@ impl CodegenBackend for CraneliftCodegenBackend {
|
|||
let mut context = Context::new();
|
||||
|
||||
{
|
||||
use std::io::Write;
|
||||
let mut cx = CodegenCx {
|
||||
tcx,
|
||||
module: &mut module,
|
||||
constants: HashMap::new(),
|
||||
};
|
||||
|
||||
let mut log = ::std::fs::File::create("../target/log.txt").unwrap();
|
||||
|
||||
for mono_item in
|
||||
collector::collect_crate_mono_items(tcx, collector::MonoItemCollectionMode::Eager).0
|
||||
{
|
||||
|
@ -258,7 +261,10 @@ impl CodegenBackend for CraneliftCodegenBackend {
|
|||
}));
|
||||
if let Err(err) = res {
|
||||
match err.downcast::<NonFatal>() {
|
||||
Ok(non_fatal) => tcx.sess.err(&non_fatal.0),
|
||||
Ok(non_fatal) => {
|
||||
writeln!(log, "{}", &non_fatal.0);
|
||||
tcx.sess.err(&non_fatal.0)
|
||||
}
|
||||
Err(err) => ::std::panic::resume_unwind(err),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue