Skip to content

Commit

Permalink
gccxml 2010-01-27 (26cdb92b)
Browse files Browse the repository at this point in the history
  • Loading branch information
GCC-XML authored and bradking committed Jan 30, 2010
1 parent abbf912 commit e81e5c5
Show file tree
Hide file tree
Showing 89 changed files with 2,367 additions and 1,151 deletions.
1 change: 1 addition & 0 deletions GCC/config_cmake/gcc_asm_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.5 FATAL_ERROR)
PROJECT(GAT C)

SET(GAT_AS as)
Expand Down
16 changes: 12 additions & 4 deletions GCC/gcc/cp/mangle.c
Original file line number Diff line number Diff line change
Expand Up @@ -2157,7 +2157,12 @@ write_expression (tree expr)
}

/* If it wasn't any of those, recursively expand the expression. */
write_string (operator_name_info[(int) code].mangled_name);
/* BEGIN GCC-XML MODIFICATIONS 2009-09-25 */
{
const char *mangled_name = operator_name_info[(int) code].mangled_name;
write_string (mangled_name? mangled_name : "(unmangled-operator)");
}
/* END GCC-XML MODIFICATIONS 2009-09-25 */

switch (code)
{
Expand Down Expand Up @@ -2224,7 +2229,10 @@ write_expression (tree expr)
"cannot be mangled");
continue;
}
write_expression (operand);
/* BEGIN GCC-XML MODIFICATIONS 2009-09-25 */
if(operand)
write_expression (operand);
/* END GCC-XML MODIFICATIONS 2009-09-25 */
}
}
}
Expand All @@ -2246,7 +2254,7 @@ write_template_arg_literal (const tree value)
switch (TREE_CODE (value))
{
case CONST_DECL:
/* BEGIN GCC-XML MODIFICATIONS (2008/02/14 15:26:25) */
/* BEGIN GCC-XML MODIFICATIONS (2009/09/25 17:34:43) */
/*
The mangling code chokes on this code:
Expand All @@ -2264,7 +2272,7 @@ write_template_arg_literal (const tree value)
write_chars (hack, sizeof(hack)-1);
break;
}
/* END GCC-XML MODIFICATIONS (2008/02/14 15:26:25) */
/* END GCC-XML MODIFICATIONS (2009/09/25 17:34:43) */
write_integer_cst (DECL_INITIAL (value));
break;

Expand Down
115 changes: 71 additions & 44 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.128 $"
#define GCC_XML_C_VERSION "$Revision: 1.132 $"

/*--------------------------------------------------------------------------*/
/* Data structures for the actual XML dump. */
Expand Down Expand Up @@ -648,17 +648,21 @@ xml_document_add_attribute_location(xml_document_element_p element,
static void
xml_print_endline_attribute (xml_dump_info_p xdi, tree body)
{
/* Get the last statement in the list. The list may be empty if the
body is for an empty implicitly-generated copy-constructor. */
tree_stmt_iterator t = tsi_last(body);
if(!tsi_end_p(t))
tree last = EXPR_P (body)? body : 0;
if (TREE_CODE (body) == STATEMENT_LIST)
{
tree stmt = tsi_stmt(t);
if(EXPR_HAS_LOCATION(stmt))
/* Get the last statement in the list. The list may be empty if the
body is for an empty implicitly-generated copy-constructor. */
tree_stmt_iterator t = tsi_last (body);
if (!tsi_end_p (t))
{
fprintf (xdi->file, " endline=\"%d\"", EXPR_LINENO(stmt));
last = tsi_stmt (t);
}
}
if (last && EXPR_HAS_LOCATION (last))
{
fprintf (xdi->file, " endline=\"%d\"", EXPR_LINENO (last));
}
}

static void
Expand Down Expand Up @@ -2415,7 +2419,11 @@ xml_output_fundamental_type (xml_dump_info_p xdi, tree t, xml_dump_node_p dn)
{
fprintf (xdi->file, " <FundamentalType");
xml_print_id_attribute (xdi, dn);
xml_print_name_attribute (xdi, DECL_NAME (TYPE_NAME (t)));
/* Some fundamental types do not have names! */
if (TYPE_NAME (t))
{
xml_print_name_attribute (xdi, DECL_NAME (TYPE_NAME (t)));
}
xml_print_attributes_attribute (xdi, TYPE_ATTRIBUTES(t), 0);
xml_print_size_attribute (xdi, t);
xml_print_align_attribute (xdi, t);
Expand Down Expand Up @@ -3103,6 +3111,7 @@ xml_find_template_parm (tree t)
}
}
case REFERENCE_TYPE: return xml_find_template_parm (TREE_TYPE (t));
case INDIRECT_REF: return xml_find_template_parm (TREE_TYPE (t));
case POINTER_TYPE: return xml_find_template_parm (TREE_TYPE (t));
case ARRAY_TYPE: return xml_find_template_parm (TREE_TYPE (t));
case OFFSET_TYPE:
Expand All @@ -3129,43 +3138,61 @@ xml_find_template_parm (tree t)
template parameters. */
case TEMPLATE_DECL: return 0;

/* Unary expressions. */
case ALIGNOF_EXPR:
case SIZEOF_EXPR:
case ADDR_EXPR:
case CONVERT_EXPR:
case NOP_EXPR:
case NEGATE_EXPR:
case BIT_NOT_EXPR:
case TRUTH_NOT_EXPR:
case PREDECREMENT_EXPR:
case PREINCREMENT_EXPR:
case POSTDECREMENT_EXPR:
case POSTINCREMENT_EXPR:
return xml_find_template_parm (TREE_OPERAND (t, 0));

/* Binary expressions. */
case COMPOUND_EXPR:
case INIT_EXPR:
case MODIFY_EXPR:
case PLUS_EXPR:
case MINUS_EXPR:
case MULT_EXPR:
case TRUNC_DIV_EXPR:
case TRUNC_MOD_EXPR:
case MIN_EXPR:
case MAX_EXPR:
case LSHIFT_EXPR:
case RSHIFT_EXPR:
case BIT_IOR_EXPR:
case BIT_XOR_EXPR:
case BIT_AND_EXPR:
case TRUTH_ANDIF_EXPR:
case TRUTH_ORIF_EXPR:
case LT_EXPR:
case LE_EXPR:
case GT_EXPR:
case GE_EXPR:
case EQ_EXPR:
case NE_EXPR:
case EXACT_DIV_EXPR:
return (xml_find_template_parm (TREE_OPERAND (t, 0))
|| xml_find_template_parm (TREE_OPERAND (t, 1)));

/* Ternary expressions. */
case COND_EXPR:
return (xml_find_template_parm (TREE_OPERAND (t, 0))
|| xml_find_template_parm (TREE_OPERAND (t, 1))
|| xml_find_template_parm (TREE_OPERAND (t, 2)));

/* Other expressions. */
case TYPEOF_TYPE:
return xml_find_template_parm (TYPEOF_TYPE_EXPR (t));

/* Other types that have no nested types. */
case INTEGER_CST: return 0;
case ALIGNOF_EXPR: return 0;
case SIZEOF_EXPR: return 0;
case ADDR_EXPR: return 0;
case BIT_AND_EXPR: return 0;
case BIT_IOR_EXPR: return 0;
case BIT_NOT_EXPR: return 0;
case BIT_XOR_EXPR: return 0;
case COMPOUND_EXPR: return 0;
case COND_EXPR: return 0;
case CONVERT_EXPR: return 0;
case EQ_EXPR: return 0;
case GE_EXPR: return 0;
case GT_EXPR: return 0;
case LE_EXPR: return 0;
case LSHIFT_EXPR: return 0;
case LT_EXPR: return 0;
case MAX_EXPR: return 0;
case MINUS_EXPR: return 0;
case MIN_EXPR: return 0;
case MODIFY_EXPR: return 0;
case MULT_EXPR: return 0;
case NEGATE_EXPR: return 0;
case NE_EXPR: return 0;
case NOP_EXPR: return 0;
case PLUS_EXPR: return 0;
case POSTDECREMENT_EXPR: return 0;
case POSTINCREMENT_EXPR: return 0;
case PREDECREMENT_EXPR: return 0;
case PREINCREMENT_EXPR: return 0;
case RSHIFT_EXPR: return 0;
case TRUNC_DIV_EXPR: return 0;
case TRUNC_MOD_EXPR: return 0;
case TRUTH_ANDIF_EXPR: return 0;
case TRUTH_NOT_EXPR: return 0;
case TRUTH_ORIF_EXPR: return 0;
case STATIC_CAST_EXPR: return 0;
default:
fprintf(stderr, "xml_find_template_parm encountered unsupported type %s\n",
Expand Down
35 changes: 19 additions & 16 deletions GCC_XML/GXFront/gxConfiguration.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,24 @@ const char* gxConfigurationVc6Registry =
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\"
"DevStudio\\6.0\\Products\\Microsoft Visual C++;ProductDir";
const char* gxConfigurationVc7Registry =
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.0;InstallDir";
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.0\\Setup\\VC;ProductDir";
const char* gxConfigurationVc71Registry =
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.1;InstallDir";
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.1\\Setup\\VC;ProductDir";
const char* gxConfigurationVc8Registry =
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir";
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir";
const char* gxConfigurationVc8RegistryVersion =
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;CLR Version";
const char* gxConfigurationVc8exRegistry =
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\8.0;InstallDir";
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\8.0\\Setup\\VC;ProductDir";
const char* gxConfigurationVc8sdkRegistry =
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3;Install Dir";
const char* gxConfigurationVc8sdk2Registry =
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1;Install Dir";

const char* gxConfigurationVc9Registry =
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir";
//"HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\9.0;InstallDir"; // _WIN64 ?
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup\\VC;ProductDir";
const char* gxConfigurationVc9exRegistry =
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir";
//"HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VCExpress\\9.0;InstallDir"; // _WIN64 ?
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0\\Setup\\VC;ProductDir";
const char* gxConfigurationVc9sdkRegistry =
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v6.0A;InstallationFolder";

Expand Down Expand Up @@ -1595,6 +1593,11 @@ bool gxConfiguration::FindFlagsGCC()
INCLUDES = "-iwrapper\"" + supportPath + "/2.96\" " + INCLUDES;
}
}
else if(MAJOR_VERSION == 4 && MINOR_VERSION >= 4)
{
INCLUDES = "-iwrapper\"" + supportPath + "/4.4\" " + INCLUDES;
SPECIAL = "-include \"gccxml_builtins.h\"";
}
else if(MAJOR_VERSION == 4 && MINOR_VERSION >= 3)
{
INCLUDES = "-iwrapper\"" + supportPath + "/4.3\" " + INCLUDES;
Expand Down Expand Up @@ -2165,8 +2168,8 @@ bool gxConfiguration::FindFlagsMSVC7()
std::cerr << "Error finding MSVC 7.0 from registry.\n";
return false;
}
std::string msvcPath1 = msvcPath+"/../../Vc7/Include";
std::string msvcPath2 = msvcPath+"/../../Vc7/PlatformSDK/Include";
std::string msvcPath1 = msvcPath+"/Include";
std::string msvcPath2 = msvcPath+"/PlatformSDK/Include";
msvcPath1 = gxSystemTools::CollapseDirectory(msvcPath1.c_str());
msvcPath2 = gxSystemTools::CollapseDirectory(msvcPath2.c_str());
std::string vcIncludePath1;
Expand Down Expand Up @@ -2209,8 +2212,8 @@ bool gxConfiguration::FindFlagsMSVC71()
std::cerr << "Error finding MSVC 7.1 from registry.\n";
return false;
}
std::string msvcPath1 = msvcPath+"/../../Vc7/Include";
std::string msvcPath2 = msvcPath+"/../../Vc7/PlatformSDK/Include";
std::string msvcPath1 = msvcPath+"/Include";
std::string msvcPath2 = msvcPath+"/PlatformSDK/Include";
msvcPath1 = gxSystemTools::CollapseDirectory(msvcPath1.c_str());
msvcPath2 = gxSystemTools::CollapseDirectory(msvcPath2.c_str());
std::string vcIncludePath1;
Expand Down Expand Up @@ -2253,8 +2256,8 @@ bool gxConfiguration::FindFlagsMSVC8()
std::cerr << "Error finding MSVC 8 from registry.\n";
return false;
}
std::string msvcPath1 = msvcPath+"/../../Vc/Include";
std::string msvcPath2 = msvcPath+"/../../Vc/PlatformSDK/Include";
std::string msvcPath1 = msvcPath+"/Include";
std::string msvcPath2 = msvcPath+"/PlatformSDK/Include";
msvcPath1 = gxSystemTools::CollapseDirectory(msvcPath1.c_str());
msvcPath2 = gxSystemTools::CollapseDirectory(msvcPath2.c_str());
std::string vcIncludePath1;
Expand Down Expand Up @@ -2317,7 +2320,7 @@ bool gxConfiguration::FindFlagsMSVC8ex()
std::cerr << "Error finding MSVC 8 Express from registry.\n";
return false;
}
std::string msvcPath1 = msvcPath+"/../../Vc/Include";
std::string msvcPath1 = msvcPath+"/Include";
msvcPath1 = gxSystemTools::CollapseDirectory(msvcPath1.c_str());
std::string vcIncludePath1;
if(!this->FindData("Vc8ex/Include", vcIncludePath1))
Expand Down Expand Up @@ -2408,7 +2411,7 @@ bool gxConfiguration::FindFlagsMSVC9()
std::cerr << "Error finding MSVC 9 Platform SDK from registry.\n";
return false;
}
std::string msvcPath1 = msvcPath+"/../../Vc/Include";
std::string msvcPath1 = msvcPath+"/Include";
std::string msvcPath2 = psdkPath+"/Include";
msvcPath1 = gxSystemTools::CollapseDirectory(msvcPath1.c_str());
msvcPath2 = gxSystemTools::CollapseDirectory(msvcPath2.c_str());
Expand Down
20 changes: 9 additions & 11 deletions GCC_XML/KWSys/Base64.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
/*=========================================================================
/*============================================================================
KWSys - Kitware System Library
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
Program: KWSys - Kitware System Library
Module: Base64.c
Distributed under the OSI-approved BSD License (the "License");
see accompanying file Copyright.txt for details.
Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
This software is distributed WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
#include "kwsysPrivate.h"
#include KWSYS_HEADER(Base64.h)

Expand Down
20 changes: 9 additions & 11 deletions GCC_XML/KWSys/Base64.h.in
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
/*=========================================================================
/*============================================================================
KWSys - Kitware System Library
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium

Program: KWSys - Kitware System Library
Module: Base64.h.in
Distributed under the OSI-approved BSD License (the "License");
see accompanying file Copyright.txt for details.

Copyright (c) Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.

=========================================================================*/
This software is distributed WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
#ifndef @KWSYS_NAMESPACE@_Base64_h
#define @KWSYS_NAMESPACE@_Base64_h

Expand Down
Loading

0 comments on commit e81e5c5

Please sign in to comment.