aboutsummaryrefslogtreecommitdiffstats
path: root/debug/DebugInformation.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2019-04-08 17:24:28 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2019-04-16 18:33:35 +0200
commit5beeba02f16b2d65cceec5ee5577547ba3547c94 (patch)
treed2b4a85eb75f06f963648fc995ee9977dfd35f98 /debug/DebugInformation.ml
parent06d846bd517cb0e47ab7b55cdbc912939524ca26 (diff)
downloadcompcert-kvx-5beeba02f16b2d65cceec5ee5577547ba3547c94.tar.gz
compcert-kvx-5beeba02f16b2d65cceec5ee5577547ba3547c94.zip
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
Diffstat (limited to 'debug/DebugInformation.ml')
-rw-r--r--debug/DebugInformation.ml12
1 files changed, 6 insertions, 6 deletions
diff --git a/debug/DebugInformation.ml b/debug/DebugInformation.ml
index 4eff6548..21c2ad19 100644
--- a/debug/DebugInformation.ml
+++ b/debug/DebugInformation.ml
@@ -635,12 +635,12 @@ let compute_gnu_file_enum f =
let all_files_iter f = StringSet.iter f !all_files
-let printed_vars: StringSet.t ref = ref StringSet.empty
+let printed_symbols: StringSet.t ref = ref StringSet.empty
-let is_variable_printed id = StringSet.mem id !printed_vars
+let is_symbol_printed id = StringSet.mem id !printed_symbols
-let variable_printed id =
- printed_vars := StringSet.add id !printed_vars
+let symbol_printed id =
+ printed_symbols := StringSet.add id !printed_symbols
let init name =
id := 0;
@@ -663,7 +663,7 @@ let init name =
Hashtbl.reset scope_ranges;
Hashtbl.reset label_translation;
all_files := StringSet.singleton name;
- printed_vars := StringSet.empty
+ printed_symbols := StringSet.empty
let default_debug =
{
@@ -693,6 +693,6 @@ let default_debug =
exists_section = exists_section;
remove_unused = remove_unused;
remove_unused_function = remove_unused_function;
- variable_printed = variable_printed;
+ symbol_printed = symbol_printed;
add_diab_info = (fun _ _ _ _ -> ());
}