1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
|
Index: gcc/cp/Make-lang.in
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/Make-lang.in,v
retrieving revision 1.108.2.2
diff -c -3 -p -r1.108.2.2 Make-lang.in
*** gcc/cp/Make-lang.in 23 May 2002 17:57:42 -0000 1.108.2.2
--- gcc/cp/Make-lang.in 27 Aug 2003 14:40:28 -0000
*************** CXX_OBJS = cp/call.o cp/decl.o cp/expr.o
*** 103,109 ****
cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parse.o cp/ptree.o cp/rtti.o \
cp/spew.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o \
cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o \
! cp/optimize.o cp/mangle.o cp/cp-lang.o
# Use loose warnings for this front end.
cp-warn =
--- 103,109 ----
cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parse.o cp/ptree.o cp/rtti.o \
cp/spew.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o \
cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o \
! cp/optimize.o cp/mangle.o cp/cp-lang.o cp/xml.o
# Use loose warnings for this front end.
cp-warn =
*************** cp/dump.o: cp/dump.c $(CXX_TREE_H) tree-
*** 291,296 ****
--- 291,297 ----
cp/optimize.o: cp/optimize.c $(CXX_TREE_H) rtl.h integrate.h insn-config.h \
input.h $(PARAMS_H) debug.h tree-inline.h
cp/mangle.o: cp/mangle.c $(CXX_TREE_H) toplev.h
+ cp/xml.o: cp/xml.c $(CXX_TREE_H) toplev.h
cp/parse.o: cp/parse.c $(CXX_TREE_H) flags.h cp/lex.h except.h output.h \
$(SYSTEM_H) toplev.h $(GGC_H)
Index: gcc/cp/cp-tree.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/cp-tree.h,v
retrieving revision 1.681.2.12
diff -c -3 -p -r1.681.2.12 cp-tree.h
*** gcc/cp/cp-tree.h 23 May 2002 17:57:42 -0000 1.681.2.12
--- gcc/cp/cp-tree.h 27 Aug 2003 14:40:44 -0000
*************** extern tree mangle_ref_init_variable
*** 4394,4399 ****
--- 4394,4415 ----
/* in dump.c */
extern int cp_dump_tree PARAMS ((void *, tree));
+ /* Filename for xml dump of translation unit. */
+ extern const char* flag_xml;
+
+ /* Start locations for dump of translation unit. */
+ extern const char* flag_xml_start;
+
+ /* Tell xml.c what version of GCC is being built. Format is 0xMMmmpp,
+ where MM is the major version number, mm is the minor version
+ number, and pp is the patch level.
+ Examples: gcc 3.0.4 = 0x030004
+ gcc 3.2.0 = 0x030200 */
+ #define GCC_XML_GCC_VERSION 0x030101
+
+ /* in xml.c */
+ extern void do_xml_output PARAMS ((const char *));
+
/* -- end of C++ */
#endif /* ! GCC_CP_TREE_H */
Index: gcc/cp/decl2.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/decl2.c,v
retrieving revision 1.520.2.7
diff -c -3 -p -r1.520.2.7 decl2.c
*** gcc/cp/decl2.c 4 Jul 2002 10:57:18 -0000 1.520.2.7
--- gcc/cp/decl2.c 27 Aug 2003 14:40:54 -0000
*************** int flag_permissive;
*** 400,405 ****
--- 400,414 ----
int flag_enforce_eh_specs = 1;
+ /* Filename for xml dump of translation unit. */
+
+ const char* flag_xml = 0;
+
+ /* Start locations for dump of translation unit. */
+
+ const char* flag_xml_start = 0;
+
+
/* Table of language-dependent -f options.
STRING is the option name. VARIABLE is the address of the variable.
ON_VALUE is the value to store in VARIABLE
*************** cxx_decode_option (argc, argv)
*** 561,566 ****
--- 570,591 ----
warning ("-fname-mangling-version is no longer supported");
return 1;
}
+ else if ((option_value
+ = skip_leading_substring (p, "xml=")))
+ {
+ if (*option_value == '\0')
+ error ("no file specified with -fxml");
+ else
+ flag_xml = option_value;
+ }
+ else if ((option_value
+ = skip_leading_substring (p, "xml-start=")))
+ {
+ if (*option_value == '\0')
+ error ("no location specified with -fxml-start");
+ else
+ flag_xml_start = option_value;
+ }
else if (dump_switch_p (p))
;
else
Index: gcc/cp/lang-options.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/Attic/lang-options.h,v
retrieving revision 1.43
diff -c -3 -p -r1.43 lang-options.h
*** gcc/cp/lang-options.h 15 Dec 2001 20:06:12 -0000 1.43
--- gcc/cp/lang-options.h 27 Aug 2003 14:40:54 -0000
*************** DEFINE_LANG_NAME ("C++")
*** 117,122 ****
--- 117,126 ----
{ "-fxref",
N_("Emit cross referencing information") },
{ "-fno-xref", "" },
+ { "-fxml=",
+ N_("Enable XML output to a file (use with -fsyntax-only)") },
+ { "-fno-xml", "" },
+ { "-fxml-start=", "Specify start locations for XML dump (use with -fxml)" },
{ "-Wreturn-type",
N_("Warn about inconsistent return types") },
Index: gcc/cp/semantics.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/semantics.c,v
retrieving revision 1.252.2.6
diff -c -3 -p -r1.252.2.6 semantics.c
*** gcc/cp/semantics.c 17 Apr 2002 01:44:01 -0000 1.252.2.6
--- gcc/cp/semantics.c 27 Aug 2003 14:40:57 -0000
*************** finish_translation_unit ()
*** 1593,1598 ****
--- 1593,1602 ----
finish_fname_decls ();
finish_file ();
+
+ /* Do XML output if enabled. */
+ if (flag_xml)
+ do_xml_output (flag_xml);
}
/* Finish a template type parameter, specified as AGGR IDENTIFIER.
|