Filter out warnings and errors for past defs

This commit is contained in:
Richard Feldman 2022-11-01 00:24:49 -04:00
parent 0980d2d357
commit 9854dceec8
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
4 changed files with 88 additions and 39 deletions

View file

@ -23,6 +23,7 @@ use target_lexicon::Triple;
pub fn gen_and_eval_llvm(
src: &str,
filter_errors_before_offset: usize,
target: Triple,
opt_level: OptLevel,
) -> (Option<ReplOutput>, Problems) {
@ -32,7 +33,13 @@ pub fn gen_and_eval_llvm(
let mut loaded;
let problems;
match compile_to_mono(&arena, src, target_info, DEFAULT_PALETTE) {
match compile_to_mono(
&arena,
src,
filter_errors_before_offset,
target_info,
DEFAULT_PALETTE,
) {
(Some(mono), probs) => {
loaded = mono;
problems = probs;