Verifier now accepts multiple errors (fixes #387). (#452)

* Verifier now accepts multiple errors (fixes #387).
This commit is contained in:
Grégoire Geis
2018-08-14 19:55:10 +02:00
committed by Dan Gohman
parent 3f582f7cbd
commit dbc547091f
17 changed files with 845 additions and 333 deletions

View File

@@ -673,7 +673,7 @@ mod test {
use ir::types::*;
use ir::{Function, InstBuilder, TrapCode};
use settings;
use verifier::verify_context;
use verifier::{verify_context, VerifierErrors};
#[test]
fn empty() {
@@ -931,6 +931,10 @@ mod test {
cfg.compute(cur.func);
let flags = settings::Flags::new(settings::builder());
verify_context(cur.func, &cfg, &dt, &flags).unwrap();
let mut errors = VerifierErrors::default();
verify_context(cur.func, &cfg, &dt, &flags, &mut errors).unwrap();
assert!(errors.0.is_empty());
}
}