Skip to content

Commit

Permalink
gccxml 2008-07-10 (077ccea0)
Browse files Browse the repository at this point in the history
  • Loading branch information
GCC-XML authored and kwrobot committed Jul 10, 2008
1 parent 8d1b2c6 commit c94addc
Show file tree
Hide file tree
Showing 25 changed files with 2,811 additions and 117 deletions.
3 changes: 3 additions & 0 deletions GCC/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
PROJECT(GCC C)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)

IF(GCCXML_INSTALL_COMPONENT_NAME_RUNTIME_EXECUTABLE)
SET(GCCXML_INSTALL_COMPONENT_RUNTIME_EXECUTABLE
Expand Down
11 changes: 8 additions & 3 deletions GCC/gcc/c-opts.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ c_common_missing_argument (const char *opt, size_t code)
case OPT_isysroot:
case OPT_isystem:
case OPT_iquote:
/* BEGIN GCC-XML MODIFICATIONS (2007/10/31 15:07:01) */
/* BEGIN GCC-XML MODIFICATIONS 2007-10-31 */
case OPT_iwrapper:
/* END GCC-XML MODIFICATIONS (2007/10/31 15:07:01) */
/* END GCC-XML MODIFICATIONS 2007-10-31 */
error ("missing path after %qs", opt);
break;

Expand Down Expand Up @@ -854,7 +854,12 @@ c_common_handle_option (size_t scode, const char *arg, int value)
break;

case OPT_isystem:
add_path (xstrdup (arg), SYSTEM, 0, true);
/* BEGIN GCC-XML MODIFICATIONS 2008-06-30 */
/* The third argument is a boolean indicating whether the files
in the directory specified are C++-aware. GCC by default
hard-codes false, but for GCC-XML we use true. */
add_path (xstrdup (arg), SYSTEM, 1, true);
/* END GCC-XML MODIFICATIONS 2008-06-30 */
break;

case OPT_iwithprefix:
Expand Down
21 changes: 21 additions & 0 deletions GCC/gcc/cp/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -2603,6 +2603,27 @@ add_implicitly_declared_members (tree t,
TYPE_HAS_CONST_ASSIGN_REF (t) = !cant_have_const_assignment;
CLASSTYPE_LAZY_ASSIGNMENT_OP (t) = 1;
}

/* BEGIN GCC-XML MODIFICATIONS 2008-06-18 */
/* We want all these declarations to be included in the dump so we
do them always. */
if (CLASSTYPE_LAZY_DEFAULT_CTOR (t))
{
lazily_declare_fn (sfk_constructor, t);
}
if (CLASSTYPE_LAZY_COPY_CTOR (t))
{
lazily_declare_fn (sfk_copy_constructor, t);
}
if (CLASSTYPE_LAZY_ASSIGNMENT_OP (t))
{
lazily_declare_fn (sfk_assignment_operator, t);
}
if (CLASSTYPE_LAZY_DESTRUCTOR (t))
{
lazily_declare_fn (sfk_destructor, t);
}
/* END GCC-XML MODIFICATIONS 2008-06-18 */
}

/* Subroutine of finish_struct_1. Recursively count the number of fields
Expand Down
12 changes: 7 additions & 5 deletions GCC/gcc/cp/xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ along with this program; if not, write to the

#include "toplev.h" /* ident_hash */

#define GCC_XML_C_VERSION "$Revision: 1.120 $"
#define GCC_XML_C_VERSION "$Revision: 1.123 $"

/*--------------------------------------------------------------------------*/
/* Data structures for the actual XML dump. */
Expand Down Expand Up @@ -1842,7 +1842,7 @@ xml_output_function_decl (xml_dump_info_p xdi, tree fd, xml_dump_node_p dn)
tag = "OperatorMethod";
name = xml_reverse_opname_lookup (DECL_NAME (fd));
do_returns = 1; do_const = 1; do_virtual = 1;
do_static = 1;
do_static = 1; do_artificial = 1;
}
else
{
Expand Down Expand Up @@ -2188,11 +2188,12 @@ xml_output_record_type (xml_dump_info_p xdi, tree rt, xml_dump_node_p dn)
{
int id;

/* Don't process any compiler-generated functions except constructors
and destructors. */
/* Don't process any compiler-generated functions except
constructors, destructors, and the assignment operator. */
if (DECL_ARTIFICIAL(func)
&& !DECL_CONSTRUCTOR_P (func)
&& !DECL_DESTRUCTOR_P (func)) continue;
&& !DECL_DESTRUCTOR_P (func)
&& !DECL_ASSIGNMENT_OPERATOR_P (func)) continue;

/* Don't output the cloned functions. */
if (DECL_CLONED_FUNCTION_P (func)) continue;
Expand Down Expand Up @@ -2992,6 +2993,7 @@ xml_find_template_parm (tree t)
case CONST_DECL: return 1;
case VAR_DECL: return 1;
case FUNCTION_DECL: return 1;
case FIELD_DECL: return 1;

/* A template deferred scoped lookup. */
case SCOPE_REF: return 1;
Expand Down
12 changes: 8 additions & 4 deletions GCC/gcc/genmodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -785,11 +785,13 @@ calc_wider_mode (void)

/* Output routines. */

/* BEGIN GCC-XML MODIFICATIONS (2008/06/02 15:41:10) */
#define tagged_printf(FMT, ARG, TAG) do { \
int count_; \
int count_=0; \
printf (" " FMT ",%n", ARG, &count_); \
printf ("%*s/* %s */\n", 27 - count_, "", TAG); \
} while (0)
/* END GCC-XML MODIFICATIONS (2008/06/02 15:41:10) */

#define print_decl(TYPE, NAME, ASIZE) \
puts ("\nconst " TYPE " " NAME "[" ASIZE "] =\n{");
Expand Down Expand Up @@ -821,7 +823,9 @@ enum machine_mode\n{");
for (c = 0; c < MAX_MODE_CLASS; c++)
for (m = modes[c]; m; m = m->next)
{
int count_;
/* BEGIN GCC-XML MODIFICATIONS (2008/06/02 15:41:10) */
int count_=0;
/* END GCC-XML MODIFICATIONS (2008/06/02 15:41:10) */
printf (" %smode,%n", m->name, &count_);
printf ("%*s/* %s:%d */\n", 27 - count_, "",
trim_filename (m->file), m->line);
Expand Down Expand Up @@ -1264,9 +1268,9 @@ main(int argc, char **argv)
{
bool gen_header = false, gen_min = false;

/* BEGIN GCC-XML MODIFICATIONS (2007/10/31 15:07:06) */
/* BEGIN GCC-XML MODIFICATIONS (2008/06/02 15:41:10) */
gccxml_fix_printf();
/* END GCC-XML MODIFICATIONS (2007/10/31 15:07:06) */
/* END GCC-XML MODIFICATIONS (2008/06/02 15:41:10) */

progname = argv[0];

Expand Down
Loading

0 comments on commit c94addc

Please sign in to comment.