Skip to content

Commit

Permalink
gccxml 2011-10-07 (bd7c6f9e)
Browse files Browse the repository at this point in the history
  • Loading branch information
GCC-XML committed Oct 7, 2011
1 parent 52a7604 commit f300f6a
Show file tree
Hide file tree
Showing 77 changed files with 49,105 additions and 642 deletions.
4 changes: 1 addition & 3 deletions GCC/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR)
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
2 changes: 1 addition & 1 deletion GCC/config_cmake/gcc_platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ SET(extra_objs ${extra_objs})
SET(extra_options ${extra_options})
SET(c_target_objs ${c_target_objs})
SET(cxx_target_objs ${cxx_target_objs})
SET(target_cpu_default ${target_cpu_default})
SET(target_cpu_default "${target_cpu_default}")
SET(out_host_hook_obj ${out_host_hook_obj})
EOF

Expand Down
37 changes: 26 additions & 11 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.134 $"
#define GCC_XML_C_VERSION "$Revision: 1.135 $"

/*--------------------------------------------------------------------------*/
/* Data structures for the actual XML dump. */
Expand Down Expand Up @@ -1096,13 +1096,24 @@ xml_print_static_method_attribute (xml_dump_info_p xdi, tree fd)
}

static void
xml_document_add_attribute_static_method(xml_document_element_p element)
xml_document_add_attribute_static(xml_document_element_p element)
{
xml_document_add_attribute(element, "static",
xml_document_attribute_type_boolean,
xml_document_attribute_use_optional, "0");
}

/*--------------------------------------------------------------------------*/
/* Print XML attribute static="1" for static functions and variables. */
static void
xml_print_static_attribute (xml_dump_info_p xdi, tree fd)
{
if (DECL_THIS_STATIC (fd))
{
fprintf (xdi->file, " static=\"1\"");
}
}

/*--------------------------------------------------------------------------*/
static int
xml_print_overrides_r (xml_dump_info_p xdi, tree type, tree fndecl);
Expand Down Expand Up @@ -1880,7 +1891,8 @@ xml_output_function_decl (xml_dump_info_p xdi, tree fd, xml_dump_node_p dn)
int do_returns = 0;
int do_const = 0;
int do_virtual = 0;
int do_static = 0;
int do_static_method = 0;
int do_static_function = 0;
int do_artificial = 0;
int do_explicit = 0;

Expand Down Expand Up @@ -1916,14 +1928,14 @@ 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_artificial = 1;
do_static_method = 1; do_artificial = 1;
}
else
{
/* An operator in a namespace. */
tag = "OperatorFunction";
name = xml_reverse_opname_lookup (DECL_NAME (fd));
do_returns = 1;
do_static_function= 1; do_returns = 1;
}
}
}
Expand All @@ -1933,12 +1945,12 @@ xml_output_function_decl (xml_dump_info_p xdi, tree fd, xml_dump_node_p dn)
{
/* A member of a class. */
tag = "Method"; do_returns = 1; do_const = 1;
do_virtual = 1; do_static = 1;
do_virtual = 1; do_static_method = 1;
}
else
{
/* A member of a namespace. */
tag = "Function"; do_returns = 1;
tag = "Function"; do_returns = 1; do_static_function = 1;
}
}

Expand All @@ -1956,7 +1968,8 @@ xml_output_function_decl (xml_dump_info_p xdi, tree fd, xml_dump_node_p dn)
if(do_explicit) xml_print_explicit_attribute (xdi, fd);
if(do_const) xml_print_const_method_attribute (xdi, fd);
if(do_virtual) xml_print_virtual_method_attributes (xdi, fd);
if(do_static) xml_print_static_method_attribute (xdi, fd);
if(do_static_method) xml_print_static_method_attribute (xdi, fd);
if(do_static_function) xml_print_static_attribute (xdi, fd);
if(do_artificial) xml_print_artificial_attribute (xdi, fd);
xml_print_throw_attribute (xdi, TREE_TYPE (fd), dn->complete);
xml_print_context_attribute (xdi, fd);
Expand Down Expand Up @@ -2043,7 +2056,7 @@ xml_document_add_element_function_helper (xml_document_info_p xdi,
}
if(do_static)
{
xml_document_add_attribute_static_method(e);
xml_document_add_attribute_static(e);
}
if(do_artificial)
{
Expand Down Expand Up @@ -2096,15 +2109,15 @@ xml_document_add_element_function (xml_document_info_p xdi,
/*do_explicit*/ 0, /*allow_arguments*/ 1, /*allow_ellipsis*/ 0);
xml_document_add_element_function_helper(
xdi, parent, "OperatorFunction", /*do_returns*/ 1, /*do_access*/ 0,
/*do_const*/ 0, /*do_virtual*/ 0, /*do_static*/ 0, /*do_artificial*/ 0,
/*do_const*/ 0, /*do_virtual*/ 0, /*do_static*/ 1, /*do_artificial*/ 0,
/*do_explicit*/ 0, /*allow_arguments*/ 1, /*allow_ellipsis*/ 0);
xml_document_add_element_function_helper(
xdi, parent, "Method", /*do_returns*/ 1, /*do_access*/ 1,
/*do_const*/ 1, /*do_virtual*/ 1, /*do_static*/ 1, /*do_artificial*/ 0,
/*do_explicit*/ 0, /*allow_arguments*/ 1, /*allow_ellipsis*/ 1);
xml_document_add_element_function_helper(
xdi, parent, "Function", /*do_returns*/ 1, /*do_access*/ 0,
/*do_const*/ 0, /*do_virtual*/ 0, /*do_static*/ 0, /*do_artificial*/ 0,
/*do_const*/ 0, /*do_virtual*/ 0, /*do_static*/ 1, /*do_artificial*/ 0,
/*do_explicit*/ 0, /*allow_arguments*/ 1, /*allow_ellipsis*/ 1);
}

Expand All @@ -2124,6 +2137,7 @@ xml_output_var_decl (xml_dump_info_p xdi, tree vd, xml_dump_node_p dn)
xml_print_mangled_attribute (xdi, vd);
xml_print_demangled_attribute (xdi, vd );
xml_print_location_attribute (xdi, vd);
xml_print_static_attribute(xdi, vd);
xml_print_extern_attribute (xdi, vd);
xml_print_artificial_attribute (xdi, vd);
xml_print_attributes_attribute (xdi, DECL_ATTRIBUTES(vd), 0);
Expand All @@ -2145,6 +2159,7 @@ xml_document_add_element_var_decl (xml_document_info_p xdi,
xml_document_add_attribute_mangled(e);
xml_document_add_attribute_demangled(e);
xml_document_add_attribute_location(e, xml_document_attribute_use_required);
xml_document_add_attribute_static(e);
xml_document_add_attribute_extern(e);
xml_document_add_attribute_artificial(e);
xml_document_add_attribute_attributes(e);
Expand Down
15 changes: 11 additions & 4 deletions GCC_XML/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR)
PROJECT(GCCXML)

# We now need at least CMake 2.4.5 to get some custom command fixes
# and a working INSTALL(DIRECTORY).
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.5 FATAL_ERROR)

# Set the version number.
SET(GCCXML_VERSION_MAJOR 0)
SET(GCCXML_VERSION_MINOR 9)
Expand Down Expand Up @@ -99,6 +96,16 @@ IF("${CMAKE_SYSTEM}" MATCHES "AIX")
SET(KWSYS_LFS_DISABLE 1)
ENDIF("${CMAKE_SYSTEM}" MATCHES "AIX")
INCLUDE_DIRECTORIES(${GCCXML_BINARY_DIR})
# install gxsys if requested:
IF(GCCXML_INSTALL_FOR_MUMMY)
IF(NOT KWSYS_INSTALL_INCLUDE_DIR)
SET(KWSYS_INSTALL_INCLUDE_DIR include)
ENDIF(NOT KWSYS_INSTALL_INCLUDE_DIR)
IF(NOT KWSYS_INSTALL_LIB_DIR)
SET(KWSYS_INSTALL_LIB_DIR lib)
ENDIF(NOT KWSYS_INSTALL_LIB_DIR)
SET(KWSYS_USE_CommandLineArguments 1)
ENDIF(GCCXML_INSTALL_FOR_MUMMY)
SUBDIRS(KWSys)

# Installation directories.
Expand Down
Loading

0 comments on commit f300f6a

Please sign in to comment.