diff options
author | Jason Merrill <jason@casey.cygnus.com> | 1999-12-15 09:37:48 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1999-12-15 04:37:48 -0500 |
commit | 6ff7fb95722130e00e6ac16d45b53c3618ea9c7c (patch) | |
tree | 0129450039d065d3547631c7a0b4550174dfdcd4 /gcc/tree.c | |
parent | 04a2ecf7808fe3c8e79141f7dca30eaacc085a8e (diff) | |
download | gcc-6ff7fb95722130e00e6ac16d45b53c3618ea9c7c.zip gcc-6ff7fb95722130e00e6ac16d45b53c3618ea9c7c.tar.gz gcc-6ff7fb95722130e00e6ac16d45b53c3618ea9c7c.tar.bz2 |
tree.c (decl_function_context): Handle virtual functions.
* tree.c (decl_function_context): Handle virtual functions.
* tlink.c (scan_linker_output): Don't look in demangled name when
looking for linker output keywords.
* dwarfout.c (output_type): We can defer namespace-scope classes.
From-SVN: r30950
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -4802,6 +4802,15 @@ decl_function_context (decl) if (TREE_CODE (decl) == SAVE_EXPR) context = SAVE_EXPR_CONTEXT (decl); + /* C++ virtual functions use DECL_CONTEXT for the class of the vtable + where we look up the function at runtime. Such functions always take + a first argument of type 'pointer to real context'. + + C++ should really be fixed to use DECL_CONTEXT for the real context, + and use something else for the "virtual context". */ + else if (TREE_CODE (decl) == FUNCTION_DECL && DECL_VINDEX (decl)) + context = TYPE_MAIN_VARIANT + (TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (decl))))); else context = DECL_CONTEXT (decl); |