aboutsummaryrefslogtreecommitdiff
path: root/gcc/gdbinit.in
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2020-01-17 09:50:33 -0500
committerDavid Malcolm <dmalcolm@redhat.com>2020-01-22 14:18:31 -0500
commit75038aa6aa5b562e6358108619d66ef2ccab9a53 (patch)
treeb1fe8edd2080d5fea96ef7347ce1fd7f93983cfa /gcc/gdbinit.in
parent68cbbe7cdc7754d5b8aa2c9072e37745ff3b7604 (diff)
downloadgcc-75038aa6aa5b562e6358108619d66ef2ccab9a53.zip
gcc-75038aa6aa5b562e6358108619d66ef2ccab9a53.tar.gz
gcc-75038aa6aa5b562e6358108619d66ef2ccab9a53.tar.bz2
analyzer: introduce namespace to avoid ODR clashes (PR 93307)
PR analyzer/93307 reports that in an LTO bootstrap, there are ODR violations between: - the "region" type: gcc/analyzer/region-model.h:792 vs: gcc/sched-int.h:1443 - the "constraint" type: gcc/analyzer/constraint-manager.h:121 vs: gcc/tree-ssa-structalias.c:533 This patches solves this clash by putting all of the analyzer names within a namespace. I chose "ana" as it is short (to save typing). The analyzer selftests are moved from namespace "selftest" to "ana::selftest". There are various places where the namespace has to be closed and reopened, to allow e.g. for specializations of templates in the global namespace. gcc/analyzer/ChangeLog: PR analyzer/93307 * analysis-plan.h: Wrap everything namespace "ana". * analyzer-logging.cc: Likewise. * analyzer-logging.h: Likewise. * analyzer-pass.cc (pass_analyzer::execute): Update for "ana" namespace. * analyzer-selftests.cc: Wrap everything namespace "ana". * analyzer-selftests.h: Likewise. * analyzer.h: Likewise for forward decls of types. * call-string.h: Likewise. * checker-path.cc: Likewise. * checker-path.h: Likewise. * constraint-manager.cc: Likewise. * constraint-manager.h: Likewise. * diagnostic-manager.cc: Likewise. * diagnostic-manager.h: Likewise. * engine.cc: Likewise. * engine.h: Likewise. * exploded-graph.h: Likewise. * function-set.cc: Likewise. * function-set.h: Likewise. * pending-diagnostic.cc: Likewise. * pending-diagnostic.h: Likewise. * program-point.cc: Likewise. * program-point.h: Likewise. * program-state.cc: Likewise. * program-state.h: Likewise. * region-model.cc: Likewise. * region-model.h: Likewise. * sm-file.cc: Likewise. * sm-malloc.cc: Likewise. * sm-pattern-test.cc: Likewise. * sm-sensitive.cc: Likewise. * sm-signal.cc: Likewise. * sm-taint.cc: Likewise. * sm.cc: Likewise. * sm.h: Likewise. * state-purge.h: Likewise. * supergraph.cc: Likewise. * supergraph.h: Likewise. gcc/ChangeLog: PR analyzer/93307 * gdbinit.in (break-on-saved-diagnostic): Update for move of diagnostic_manager into "ana" namespace. * selftest-run-tests.c (selftest::run_tests): Update for move of selftest::run_analyzer_selftests to ana::selftest::run_analyzer_selftests.
Diffstat (limited to 'gcc/gdbinit.in')
-rw-r--r--gcc/gdbinit.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/gdbinit.in b/gcc/gdbinit.in
index 0b4631d..c4f400c 100644
--- a/gcc/gdbinit.in
+++ b/gcc/gdbinit.in
@@ -291,11 +291,11 @@ command-line options).
end
define break-on-saved-diagnostic
-break diagnostic_manager::add_diagnostic
+break ana::diagnostic_manager::add_diagnostic
end
document break-on-saved-diagnostic
-Put a breakpoint on diagnostic_manager::add_diagnostic, called within
+Put a breakpoint on ana::diagnostic_manager::add_diagnostic, called within
the analyzer whenever a diagnostic is saved for later de-duplication and
possible emission.
end