[lto] add support for reading/writing functions whose context is a type

Ollie Wild aaw@google.com
Tue Apr 15 23:22:00 GMT 2008


In C++, the DECL_CONTEXT of a method is a type.  Currently, this
generates an assertion failure inside output_expr_operand().  This
patch adds a new tag, LTO_type, and support for reading/writing it
within the lto driver.

Tested with a C/C++ bootstrap and dg-torture testsuite on i686-pc-linux-gnu.

Ollie


2008-04-15  Ollie Wild  <aaw@google.com>

        * lto-function-out.c (output_type_ref_1): New function.
        (output_type_ref): Split into two functions.
        (output_function): Output an LTO_type record if DECL_CONTEXT (function)
        is a type.
        * lto-tags.h (LTO_tags): Add LTO_type enumerator.
        * lto-tree-tags.def (LTO_type): Add new name.

2008-04-15  Ollie Wild  <aaw@google.com>

        * lto-function-in.c (input_type_ref_1): New function.
        (input_type_ref): Split into two functions.
        (input_function): Add support for type contexts.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: decl_context.patch
Type: text/x-patch
Size: 5221 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080415/952b6c98/attachment.bin>


More information about the Gcc-patches mailing list