summaryrefslogtreecommitdiffstats
path: root/bytecomp/translmod.ml
diff options
context:
space:
mode:
Diffstat (limited to 'bytecomp/translmod.ml')
-rw-r--r--bytecomp/translmod.ml8
1 files changed, 1 insertions, 7 deletions
diff --git a/bytecomp/translmod.ml b/bytecomp/translmod.ml
index 7f52f99a1..a80fee68f 100644
--- a/bytecomp/translmod.ml
+++ b/bytecomp/translmod.ml
@@ -109,13 +109,7 @@ let mod_prim name =
fatal_error ("Primitive " ^ name ^ " not found.")
let undefined_location loc =
- (* Confer Translcore.assert_failed *)
- let fname = match loc.Location.loc_start.Lexing.pos_fname with
- | "" -> !Location.input_name
- | x -> x in
- let pos = loc.Location.loc_start in
- let line = pos.Lexing.pos_lnum in
- let char = pos.Lexing.pos_cnum - pos.Lexing.pos_bol in
+ let (fname, line, char) = Location.get_pos_info loc.Location.loc_start in
Lconst(Const_block(0,
[Const_base(Const_string fname);
Const_base(Const_int line);