diff options
| author | Graydon Hoare <[email protected]> | 2010-07-20 13:55:56 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-07-20 13:55:56 -0700 |
| commit | 62522def7409a233f5316546cd6bee91e812a039 (patch) | |
| tree | 5ac4085ee755b9c83bdd378d6460d4a57ebb0846 /src/boot/me/semant.ml | |
| parent | Re-XFAIL stuff that is definitely still unsupported in LLVM-land (like, throw... (diff) | |
| download | rust-62522def7409a233f5316546cd6bee91e812a039.tar.xz rust-62522def7409a233f5316546cd6bee91e812a039.zip | |
Tidy up handling of unimplemented features. These are expected (if undesirable) sorts of error, we should handle better than "backtrace and exit 2".
Diffstat (limited to 'src/boot/me/semant.ml')
| -rw-r--r-- | src/boot/me/semant.ml | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/boot/me/semant.ml b/src/boot/me/semant.ml index 1992bf93..41d28d32 100644 --- a/src/boot/me/semant.ml +++ b/src/boot/me/semant.ml @@ -261,23 +261,10 @@ let new_ctxt sess abi crate = } ;; -let report_err cx ido str = - let sess = cx.ctxt_sess in - let spano = match ido with - None -> None - | Some id -> (Session.get_span sess id) - in - match spano with - None -> - Session.fail sess "Error: %s\n%!" str - | Some span -> - Session.fail sess "%s:E:Error: %s\n%!" - (Session.string_of_span span) str -;; let bugi (cx:ctxt) (i:node_id) = let k s = - report_err cx (Some i) s; + Session.report_err cx.ctxt_sess (Some i) s; failwith s in Printf.ksprintf k ;; @@ -1857,7 +1844,8 @@ let run_passes Session.time_inner name sess (fun _ -> Array.iteri do_pass passes) with - Semant_err (ido, str) -> report_err cx ido str + Semant_err (ido, str) -> + Session.report_err cx.ctxt_sess ido str ;; (* Rust type -> IL type conversion. *) |