diff options
author | Keith Seitz <keiths@redhat.com> | 2014-06-07 10:40:39 -0700 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2014-06-07 10:40:39 -0700 |
commit | 4186eb54dd4d57b59d58f470ec0fa9b19b9c9d5e (patch) | |
tree | a06ca25b09e28008b738dbbda552e4628c4fdbc4 /gdb/cp-support.c | |
parent | b893397a4b1316610f49819344817715e4305de9 (diff) | |
download | gdb-4186eb54dd4d57b59d58f470ec0fa9b19b9c9d5e.zip gdb-4186eb54dd4d57b59d58f470ec0fa9b19b9c9d5e.tar.gz gdb-4186eb54dd4d57b59d58f470ec0fa9b19b9c9d5e.tar.bz2 |
Revert patchset for c++/16253: it causes a large performance regression.
See the bug for further information.
Diffstat (limited to 'gdb/cp-support.c')
-rw-r--r-- | gdb/cp-support.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/gdb/cp-support.c b/gdb/cp-support.c index 91533e8..2379b54 100644 --- a/gdb/cp-support.c +++ b/gdb/cp-support.c @@ -35,7 +35,6 @@ #include "expression.h" #include "value.h" #include "cp-abi.h" -#include "language.h" #include "safe-ctype.h" @@ -178,29 +177,7 @@ inspect_type (struct demangle_parse_info *info, sym = NULL; TRY_CATCH (except, RETURN_MASK_ALL) { - /* It is not legal to have a typedef and tag name of the same - name in C++. However, anonymous composite types that are defined - with a typedef ["typedef struct {...} anonymous_struct;"] WILL - have symbols for a TYPE_CODE_TYPEDEF (in VAR_DOMAIN) and a - TYPE_CODE_STRUCT (in STRUCT_DOMAIN). - - If VAR_DOMAIN is searched first, it will return the TYPEDEF symbol, - and this function will never output the definition of the typedef, - since type_print is called below with SHOW = -1. [The typedef hash - is never initialized/used when SHOW <= 0 -- and the finder - (find_typedef_for_canonicalize) will always return NULL as a result.] - - Consequently, type_print will eventually keep calling this function - to replace the typedef (via - print_name_maybe_canonical/cp_canonicalize_full). This leads to - infinite recursion. - - This can all be safely avoid by explicitly searching STRUCT_DOMAIN - first to find the structure definition. */ - if (current_language->la_language == language_cplus) - sym = lookup_symbol (name, 0, STRUCT_DOMAIN, 0); - if (sym == NULL) - sym = lookup_symbol (name, 0, VAR_DOMAIN, NULL); + sym = lookup_symbol (name, 0, VAR_DOMAIN, 0); } if (except.reason >= 0 && sym != NULL) |