diff options
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r-- | gcc/cgraph.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h index c13d798..0215522 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -3353,4 +3353,27 @@ xstrdup_for_dump (const char *transient_str) return ggc_strdup (transient_str); } +extern GTY(()) symbol_table *saved_symtab; + +#if CHECKING_P + +namespace selftest { + +/* An RAII-style class for use in selftests for temporarily using a different + symbol_table, so that such tests can be isolated from each other. */ + +class symbol_table_test +{ + public: + /* Constructor. Override "symtab". */ + symbol_table_test (); + + /* Destructor. Restore the saved_symtab. */ + ~symbol_table_test (); +}; + +} // namespace selftest + +#endif /* CHECKING_P */ + #endif /* GCC_CGRAPH_H */ |