From: David Malcolm Date: Thu, 29 Oct 2020 00:07:35 +0000 (-0400) Subject: analyzer: fix more pointer-printing in logs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0a36f5f21cd9dcaaf99e78d2ec995d6cb2918274;p=gcc.git analyzer: fix more pointer-printing in logs gcc/analyzer/ChangeLog: * program-state.cc (sm_state_map::print): Guard the printing of the origin pointer with !flag_dump_noaddr. * region.cc (string_region::dump_to_pp): Likewise for m_string_cst. --- diff --git a/gcc/analyzer/program-state.cc b/gcc/analyzer/program-state.cc index 6a91554357c..7d719b1a6da 100644 --- a/gcc/analyzer/program-state.cc +++ b/gcc/analyzer/program-state.cc @@ -224,8 +224,11 @@ sm_state_map::print (const region_model *model, if (e.m_origin) { pp_string (pp, " (origin: "); - pp_pointer (pp, e.m_origin); - pp_string (pp, ": "); + if (!flag_dump_noaddr) + { + pp_pointer (pp, e.m_origin); + pp_string (pp, ": "); + } e.m_origin->dump_to_pp (pp, simple); if (model) if (tree rep = model->get_representative_tree (e.m_origin)) diff --git a/gcc/analyzer/region.cc b/gcc/analyzer/region.cc index c43fb782b7d..ed68a2240f3 100644 --- a/gcc/analyzer/region.cc +++ b/gcc/analyzer/region.cc @@ -1135,9 +1135,12 @@ string_region::dump_to_pp (pretty_printer *pp, bool simple) const { pp_string (pp, "string_region("); dump_tree (pp, m_string_cst); - pp_string (pp, " ("); - pp_pointer (pp, m_string_cst); - pp_string (pp, "))"); + if (!flag_dump_noaddr) + { + pp_string (pp, " ("); + pp_pointer (pp, m_string_cst); + pp_string (pp, "))"); + } } }