Message ID | or4m26851e.fsf@lxoliva.fsfla.org |
---|---|
State | New |
Headers | show |
On Dec 14, 2016, Alexandre Oliva <aoliva@redhat.com> wrote: > On Oct 19, 2016, Alexandre Oliva <aoliva@redhat.com> wrote: >> On Sep 23, 2016, Alexandre Oliva <aoliva@redhat.com> wrote: >>> This patchset adds support for the C++ language to libcc1. >>> It updates a few patches for libcc1 by Jan Kratochvil, posted long ago >>> but IIRC not reviewed; it updates a patch that adds support for >>> representing aliases and trampolines in dwarf2+ debug info (useful for >>> naming all cdtors clones), adding support for combined dwarf2 and vms >>> debug output compared with the earlier version; and finally the actual >>> extension of libcc1 to support the C++ language, with a few changes to >>> the C++ front-end to make some functionality available to libcc1, to >>> introduce symbol lookups through libcc1, to enable code snippets to be >>> regarded as friends of every class, and other minor adjustments. >>> Regstrapped on x86_64-linux-gnu and i686-linux-gnu; libcc1 was tested >>> with GDB branch users/pmuldoon/c++compile, where GDB support for C++ >>> compile code is being developed. >>> Ok to install? >> Ping? > Ping? >> https://gcc.gnu.org/ml/gcc-patches/2016-09/msg01744.html Ping? > I include at the end of this message two incremental patches that I've > integrated into my current version of the last patch of the series. https://gcc.gnu.org/ml/gcc-patches/2016-12/msg01325.html
diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc index 3ea4873..f59f587 100644 --- a/libcc1/libcp1plugin.cc +++ b/libcc1/libcp1plugin.cc @@ -718,7 +718,9 @@ address_rewriter (tree *in, int *walk_subtrees, void *arg) { plugin_context *ctx = (plugin_context *) arg; - if (!DECL_P (*in) || DECL_NAME (*in) == NULL_TREE) + if (!DECL_P (*in) + || TREE_CODE (*in) == NAMESPACE_DECL + || DECL_NAME (*in) == NULL_TREE) return NULL_TREE; decl_addr_value value; libcp1: clear enum types' opaque bit, don't create redundant decls for them diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc index f59f587..0be8190 100644 --- a/libcc1/libcp1plugin.cc +++ b/libcc1/libcp1plugin.cc @@ -1960,12 +1960,9 @@ plugin_start_new_enum_type (cc1_plugin::connection *self, gcc_assert (is_new_type); source_location loc = ctx->get_source_location (filename, line_number); - tree type_decl = build_decl (loc, TYPE_DECL, id, type); - TYPE_NAME (type) = type_decl; - TYPE_STUB_DECL (type) = type_decl; - DECL_CONTEXT (type_decl) = TYPE_CONTEXT (type); - - safe_pushtag (DECL_NAME (type_decl), type, ts_current); + tree type_decl = TYPE_NAME (type); + DECL_SOURCE_LOCATION (type_decl) = loc; + SET_OPAQUE_ENUM_P (type, false); set_access_flags (type_decl, flags);