Reintroduce prepending the input file name to the miri arguments

This commit is contained in:
Oliver Scherer 2019-03-10 12:03:51 +01:00
parent 7d142ecf75
commit ecae3751b4

View File

@ -42,8 +42,12 @@ fn after_analysis(&mut self, compiler: &interface::Compiler) -> bool {
compiler.global_ctxt().unwrap().peek_mut().enter(|tcx| {
let (entry_def_id, _) = tcx.entry_fn(LOCAL_CRATE).expect("no main function found!");
let mut config = self.miri_config.clone();
miri::eval_main(tcx, entry_def_id, self.miri_config.clone());
// Add filename to `miri` arguments.
config.args.insert(0, compiler.input().filestem().to_string());
miri::eval_main(tcx, entry_def_id, config);
});
compiler.session().abort_if_errors();