summaryrefslogtreecommitdiff
path: root/asmcomp/asmlink.ml
diff options
context:
space:
mode:
Diffstat (limited to 'asmcomp/asmlink.ml')
-rw-r--r--asmcomp/asmlink.ml7
1 files changed, 7 insertions, 0 deletions
diff --git a/asmcomp/asmlink.ml b/asmcomp/asmlink.ml
index f6a85a94c5..30bb13f638 100644
--- a/asmcomp/asmlink.ml
+++ b/asmcomp/asmlink.ml
@@ -390,3 +390,10 @@ let report_error ppf = function
Location.print_filename filename name
Location.print_filename filename
name
+
+let () =
+ Location.register_error_of_exn
+ (function
+ | Error err -> Some (Location.error_of_printer_file report_error err)
+ | _ -> None
+ )