diff options
-rwxr-xr-x | boot/ocamlc | bin | 1179861 -> 1180947 bytes | |||
-rwxr-xr-x | boot/ocamldep | bin | 318360 -> 318559 bytes | |||
-rw-r--r-- | bytecomp/bytelink.ml | 2 | ||||
-rw-r--r-- | parsing/location.ml | 5 | ||||
-rw-r--r-- | parsing/location.mli | 4 |
5 files changed, 9 insertions, 2 deletions
diff --git a/boot/ocamlc b/boot/ocamlc Binary files differindex 2fbd8fb94..85aef73f3 100755 --- a/boot/ocamlc +++ b/boot/ocamlc diff --git a/boot/ocamldep b/boot/ocamldep Binary files differindex fa3f81340..fb7a64301 100755 --- a/boot/ocamldep +++ b/boot/ocamldep diff --git a/bytecomp/bytelink.ml b/bytecomp/bytelink.ml index eae782819..f55181d9f 100644 --- a/bytecomp/bytelink.ml +++ b/bytecomp/bytelink.ml @@ -177,7 +177,7 @@ let check_consistency ppf file_name cu = begin try let source = List.assoc cu.cu_name !implementations_defined in Location.print_warning (Location.in_file file_name) ppf - (Warnings.Multiple_definition(cu.cu_name, file_name, source)) + (Warnings.Multiple_definition(cu.cu_name, Location.show_filename file_name, Location.show_filename source)) with Not_found -> () end; implementations_defined := diff --git a/parsing/location.ml b/parsing/location.ml index ff39de465..ad13e70e3 100644 --- a/parsing/location.ml +++ b/parsing/location.ml @@ -214,8 +214,11 @@ let absolute_path s = (* This function could go into Filename *) in aux s +let show_filename file = + if !absname then absolute_path file else file + let print_filename ppf file = - Format.fprintf ppf "%s" (if !absname then absolute_path file else file) + Format.fprintf ppf "%s" (show_filename file) let reset () = num_loc_lines := 0 diff --git a/parsing/location.mli b/parsing/location.mli index 0303c0add..1f12366fd 100644 --- a/parsing/location.mli +++ b/parsing/location.mli @@ -60,5 +60,9 @@ val highlight_locations: formatter -> t -> t -> bool val print: formatter -> t -> unit val print_filename: formatter -> string -> unit +val show_filename: string -> string + (** In -absname mode, return the absolute path for this filename. + Otherwise, returns the filename unchanged. *) + val absname: bool ref |