From 5beeba02f16b2d65cceec5ee5577547ba3547c94 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Mon, 8 Apr 2019 17:24:28 +0200 Subject: Print only debug info for printed functions. Functions that are removed from the compilation unit, for example inline functions without extern, should not produce debug information. This commit reuses the mechanism used for variables in order to track additionally the printed functions. Therefore the printed variable versions are exchanged for a printed symbol version. Bug 26234 --- backend/PrintAsm.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'backend/PrintAsm.ml') diff --git a/backend/PrintAsm.ml b/backend/PrintAsm.ml index 92d465d5..dd428808 100644 --- a/backend/PrintAsm.ml +++ b/backend/PrintAsm.ml @@ -40,6 +40,7 @@ module Printer(Target:TARGET) = let print_function oc name fn = Hashtbl.clear current_function_labels; + Debug.symbol_printed (extern_atom name); let (text, lit, jmptbl) = Target.get_section_names name in Target.section oc text; let alignment = @@ -117,7 +118,7 @@ module Printer(Target:TARGET) = match v.gvar_init with | [] -> () | _ -> - Debug.variable_printed (extern_atom name); + Debug.symbol_printed (extern_atom name); let sec = match C2C.atom_sections name with | [s] -> s -- cgit