diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2013-11-28 14:34:45 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2013-11-28 14:34:45 +0000 |
commit | 3d7d4b92695e189304fcfe1cdc78950b51a5dbf9 (patch) | |
tree | c3b8bef81983365bfd5604d37c20427faf0b4fdd /asmcomp/emitaux.ml | |
parent | 948d5200236ec7a01bd5d94649a4fd7627445499 (diff) |
PR#6243: Make "ocamlopt -g" more resistant to ill-formed locations.
(Reflecting commit r14321 on version/4.01)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14322 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'asmcomp/emitaux.ml')
-rw-r--r-- | asmcomp/emitaux.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/asmcomp/emitaux.ml b/asmcomp/emitaux.ml index 3ad467cbf..ccfa977ff 100644 --- a/asmcomp/emitaux.ml +++ b/asmcomp/emitaux.ml @@ -221,9 +221,9 @@ let reset_debug_info () = let emit_debug_info dbg = if is_cfi_enabled () && (!Clflags.debug || Config.with_frame_pointers) - && not (Debuginfo.is_none dbg) then begin + && dbg.Debuginfo.dinfo_line > 0 (* PR#6243 *) + then begin let line = dbg.Debuginfo.dinfo_line in - assert (line <> 0); (* clang errors out on zero line numbers *) let file_name = dbg.Debuginfo.dinfo_file in let file_num = try List.assoc file_name !file_pos_nums |