Go to file
David Malcolm 812b1403a8 Introduce class rtx_reader
Bundle up various global variables within gensupport.c into a
class rtx_reader, with a view towards making it easier to run the
code more than once in-process.

gcc/ChangeLog:
	* genconstants.c (main): Introduce noop_reader and convert call
	to read_md_files to a method call.
	* genenums.c (main): Likewise.
	* genmddeps.c (main): Likewise.
	* genpreds.c (write_tm_constrs_h): Replace use of "in_fname" with
	rtx_reader_ptr->get_top_level_filename ().
	(write_tm_preds_h): Likewise.
	(write_insn_preds_c): Likewise.
	* gensupport.c (class gen_reader): New subclass of rtx_reader.
	(rtx_handle_directive): Convert to...
	(gen_reader::handle_unknown_directive): ...this.
	(init_rtx_reader_args_cb): Convert return type from bool to
	rtx_reader *.  Create a gen_reader instance, using it for the
	call to read_md_files.  Return it if no errors occur.
	(init_rtx_reader_args): Convert return type from bool to
	rtx_reader *.
	* gensupport.h (init_rtx_reader_args_cb): Likewise.
	(init_rtx_reader_args_cb): Likewise.
	* read-md.c (struct file_name_list): Move to class rtx_reader.
	(read_md_file): Delete in favor of rtx_reader::m_read_md_file.
	(read_md_filename): Delete in favor of
	rtx_reader::m_read_md_filename.
	(read_md_lineno): Delete in favor of rtx_reader::m_read_md_lineno.
	(in_fname): Delete in favor of rtx_reader::m_toplevel_fname.
	(base_dir): Delete in favor of rtx_reader::m_base_dir.
	(first_dir_md_include): Delete in favor of
	rtx_reader::m_first_dir_md_include.
	(last_dir_md_include_ptr): Delete in favor of
	rtx_reader::m_last_dir_md_include_ptr.
	(max_include_len): Delete.
	(rtx_reader_ptr): New.
	(fatal_with_file_and_line): Use get_filename and get_lineno
	accessors of rtx_reader_ptr.
	(require_char_ws): Likewise.
	(rtx_reader::read_char): New method, based on ::read_char.
	(rtx_reader::unread_char): New method, based on ::unread_char.
	(read_escape): Use get_filename and get_lineno accessors of
	rtx_reader_ptr.
	(read_braced_string): Use get_lineno accessor of rtx_reader_ptr.
	(read_string): Use get_filename and get_lineno accessors of
	rtx_reader_ptr.
	(rtx_reader::rtx_reader): New ctor.
	(rtx_reader::~rtx_reader): New dtor.
	(handle_include): Convert from a function to...
	(rtx_reader::handle_include): ...this method, converting
	handle_directive from a callback to a virtual function.
	(handle_file): Likewise, converting to...
	(rtx_reader::handle_file): ...this method.
	(handle_toplevel_file): Likewise, converting to...
	(rtx_reader::handle_toplevel_file): ...this method.
	(rtx_reader::get_current_location): New method.
	(parse_include): Convert from a function to...
	(rtx_reader::add_include_path): ...this method, dropping redundant
	update to unused max_include_len.
	(read_md_files): Convert from a function to...
	(rtx_reader::read_md_files): ...this method, converting
	handle_directive from a callback to a virtual function.
	(noop_reader::handle_unknown_directive): New method.
	* read-md.h (directive_handler_t): Delete this typedef.
	(in_fname): Delete.
	(read_md_file): Delete.
	(read_md_lineno): Delete.
	(read_md_filename): Delete.
	(class rtx_reader): New class.
	(rtx_reader_ptr): New decl.
	(class noop_reader): New subclass of rtx_reader.
	(read_char): Reimplement in terms of rtx_reader::read_char.
	(unread_char): Reimplement in terms of rtx_reader::unread_char.
	(read_md_files): Delete.
	* read-rtl.c (read_rtx_code): Update for deletion of globals
	read_md_filename and read_md_lineno.

From-SVN: r240333
2016-09-21 20:55:06 +00:00
boehm-gc [Hurd, kFreeBSD] boehm-gc: Use mmap instead of brk 2016-03-29 23:05:07 +02:00
config remove support for the interix target 2016-06-21 21:57:20 +00:00
contrib Report DejaGnu ERROR messages in dg-extract-results. 2016-09-20 22:15:30 +02:00
fixincludes inclhack.def (hpux_longjmp): Adjust select regular expression. 2016-09-04 16:17:10 +00:00
gcc Introduce class rtx_reader 2016-09-21 20:55:06 +00:00
gnattools configure.ac: Add ACX_NONCANONICAL_HOST. 2016-05-16 08:55:12 +00:00
gotools Update copyright dates 2016-06-07 08:54:22 +00:00
include dwarf2.def (DW_AT_string_length_bit_size, [...]): New attributes. 2016-08-15 11:51:44 +02:00
INSTALL README: Do not mention CVS. 2014-10-12 15:05:28 +00:00
intl Makefile.def (libiconv): Define bootstrap=true. 2015-08-07 01:13:52 -04:00
libada config.guess: Remove SH5 support. 2016-04-30 09:11:03 +00:00
libatomic [libatomic] Add missing files for RTEMS support 2016-05-10 06:52:48 +00:00
libbacktrace * all: Remove meaningless trailing whitespace. 2016-09-11 13:44:07 +00:00
libcc1 Update copyright dates 2016-06-07 08:54:22 +00:00
libcilkrts configure.ac: Move AC_USE_SYSTEM_EXTENSIONS behind AM_ENABLE_MULTILIB. 2016-05-10 16:44:19 +00:00
libcpp Add from_macro_definition_at predicate for locations. 2016-09-21 15:59:29 -04:00
libdecnumber Update copyright years. 2016-01-04 15:30:50 +01:00
libffi ffi.c (ffi_struct_type): Put type declaration on separate line. 2016-09-04 17:39:05 +00:00
libgcc configure.ac: Do not create links, only substitute the filenames. 2016-09-21 12:53:20 +00:00
libgfortran Use rand_s on MinGW-w64, fix array bound overflow. 2016-09-21 13:07:06 +03:00
libgo syscall: build export_unix_test.go on solaris 2016-09-20 18:26:55 +00:00
libgomp typeck.c (cp_build_unary_op): Diagnose incrementing boolean expressions. 2016-09-14 17:46:59 +00:00
libiberty Fix zero-length parameter bug in pex_run. 2016-09-19 10:02:56 +00:00
libitm Allocate memory on cache line if requested 2016-04-19 10:01:11 -07:00
libjava Fix return type handling for Proxy classes 2016-07-13 21:34:52 +00:00
libmpx mpx_wrappers.c (move_bounds): Fix overflow bug. 2016-06-10 09:23:53 +00:00
libobjc Update copyright years. 2016-01-04 15:30:50 +01:00
liboffloadmic backport: Makefile.am (myo_inc_dir): Remove. 2016-07-21 18:41:27 +00:00
libquadmath gcc.c (process_command): Update copyright notice dates. 2016-01-04 14:03:35 +01:00
libsanitizer re PR sanitizer/77567 (ASAN: Bugus error "alloc-dealloc-mismatch (malloc vs operator delete [])" with C++17's over-aligned types) 2016-09-21 16:40:30 +02:00
libssp re PR target/65867 (bootstrap fails for mingw32 due to missing header in ssp.c) 2016-02-09 12:16:30 -07:00
libstdc++-v3 re PR libstdc++/77288 (Std::experimental::optional::operator= implementation is broken in gcc 6.1) 2016-09-21 20:37:17 +03:00
libvtv Don't install libvtv without --enable-vtable-verify 2016-05-02 18:10:17 +00:00
lto-plugin re PR driver/68463 (Offloading fails when some objects are compiled with LTO and some without) 2016-02-25 12:23:52 +00:00
maintainer-scripts re PR web/50642 (onlinedocs formated text too small to read) 2016-09-04 19:38:05 +00:00
zlib 2015-11-23 Matthias Klose <doko@ubuntu.com> 2015-11-23 20:27:57 +00:00
.dir-locals.el
.gitattributes add basic .gitattributes files to notice whitespace issues 2016-04-23 02:37:43 +00:00
.gitignore .gitignore: Ignore in-tree prerequisites. 2016-09-09 17:20:55 -04:00
ABOUT-NLS
ChangeLog configure.ac: Check for the minimum in-tree MPFR version handled. 2016-09-12 14:08:48 +00:00
ChangeLog.jit Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
ChangeLog.tree-ssa
compile Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
config-ml.in re PR other/66259 (Combined gcc and binutils build from git-master fails, with gas/as-new not existing) 2015-07-24 12:20:44 -06:00
config.guess config.guess: Import version 2016-04-02 (newest). 2016-05-16 16:13:37 -06:00
config.rpath
config.sub config.guess: Import version 2016-04-02 (newest). 2016-05-16 16:13:37 -06:00
configure configure.ac: Check for the minimum in-tree MPFR version handled. 2016-09-12 14:08:48 +00:00
configure.ac configure.ac: Check for the minimum in-tree MPFR version handled. 2016-09-12 14:08:48 +00:00
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
install-sh Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
libtool-ldflags re PR sanitizer/56781 (boostrap-asan failure: fixincl fails to link (missing -lasan)) 2014-04-17 14:23:28 +02:00
libtool.m4 * libtool.m4 (export_symbols_cmds) [AIX]: Add global TLS "L" symbols. 2015-11-26 08:20:59 -05:00
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS MAINTAINERS (Write After Approval): Add myself. 2016-07-19 10:39:19 +00:00
Makefile.def Add make autoprofiledbootstrap 2016-06-23 14:34:16 +00:00
Makefile.in Add make autoprofiledbootstrap 2016-06-23 14:34:16 +00:00
Makefile.tpl Add make autoprofiledbootstrap 2016-06-23 14:34:16 +00:00
missing Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
mkdep
mkinstalldirs Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
move-if-change Update move-if-change from gnulib 2014-11-16 16:12:44 +00:00
README
symlink-tree
ylwrap Update from upstream Automake files. 2014-11-16 14:07:13 +00:00

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.