gcc/libcc1
Tom Tromey 1d9c972601 libcc1: unify compiler handling
Both libcc1 plugins have nearly identical copies of code to find the
underlying compiler.  This seemed wasteful to me, so this patch
unifies the copies.

Two minor API changes were needed.

First, the old code used a back-link from the compiler object to the
plugin object to check the 'verbose' setting.  This patch adds a
'verbose' setting directly to the compiler object instead.

Second, the 'find' method implicitly knew which compiler base name
("gcc" or "g++") to use.  This patch makes this a parameter that is
passed in by the plugin.

libcc1

	* libcp1.cc (compiler, compiler_triplet_regexp)
	(compiler_driver_filename): Remove.
	(libcp1::libcp1): Update.
	(make_regexp, libcp1::compiler::find)
	(libcp1::compiler_triplet_regexp::find)
	(libcp1::compiler_driver_filename::find): Remove.
	(libcp1_set_verbose, libcp1_set_arguments)
	(libcp1_set_triplet_regexp, libcp1_set_driver_filename): Update.
	* libcc1.cc (compiler, compiler_triplet_regexp)
	(compiler_driver_filename): Remove.
	(libcc1::libcc1): Update.
	(make_regexp, libcc1::compiler::find)
	(libcc1::compiler_triplet_regexp::find)
	(libcc1::compiler_driver_filename::find): Remove.
	(libcc1_set_verbose, libcc1_set_arguments)
	(libcc1_set_triplet_regexp, libcc1_set_driver_filename): Update.
	* compiler.cc: New file.
	* compiler.hh: New file.
	* Makefile.in: Rebuild.
	* Makefile.am (libcc1_la_SOURCES): Add compiler.hh, compiler.cc.
2021-05-05 00:06:17 -06:00
..
aclocal.m4 libcc1: Enable Intel CET on Intel CET enabled host 2020-05-12 09:12:37 -07:00
callbacks.cc Update copyright years. 2021-01-04 10:26:59 +01:00
callbacks.hh libcc1: delete copy constructor and assignment operators 2021-05-05 00:06:16 -06:00
cc1plugin-config.h.in Let GDB reuse GCC's parser. 2014-10-27 17:21:42 +00:00
ChangeLog Daily bump. 2021-05-04 00:16:53 +00:00
compiler-name.hh Update copyright years. 2021-01-04 10:26:59 +01:00
compiler.cc libcc1: unify compiler handling 2021-05-05 00:06:17 -06:00
compiler.hh libcc1: unify compiler handling 2021-05-05 00:06:17 -06:00
configure GCC_CET_HOST_FLAGS: Check if host supports multi-byte NOPs 2021-05-03 05:01:23 -07:00
configure.ac Update copyright years. 2021-01-04 10:26:59 +01:00
connection.cc libcc1: inline some simple methods 2021-05-05 00:06:16 -06:00
connection.hh libcc1: delete copy constructor and assignment operators 2021-05-05 00:06:16 -06:00
deleter.hh libcc1: add more uses of 'deleter' 2021-05-05 00:06:17 -06:00
findcomp.cc Update copyright years. 2021-01-04 10:26:59 +01:00
findcomp.hh Update copyright years. 2021-01-04 10:26:59 +01:00
libcc1.cc libcc1: unify compiler handling 2021-05-05 00:06:17 -06:00
libcc1.sym Introduce C++ support in libcc1 2017-01-31 01:02:03 +00:00
libcc1plugin.cc libcc1: use std::vector when building function types 2021-05-05 00:06:16 -06:00
libcc1plugin.sym Let GDB reuse GCC's parser. 2014-10-27 17:21:42 +00:00
libcp1.cc libcc1: unify compiler handling 2021-05-05 00:06:17 -06:00
libcp1plugin.cc libcc1: use std::vector when building function types 2021-05-05 00:06:16 -06:00
libcp1plugin.sym Introduce C++ support in libcc1 2017-01-31 01:02:03 +00:00
Makefile.am libcc1: unify compiler handling 2021-05-05 00:06:17 -06:00
Makefile.in libcc1: unify compiler handling 2021-05-05 00:06:17 -06:00
marshall-cp.hh libcc1: add more uses of 'deleter' 2021-05-05 00:06:17 -06:00
marshall.cc libcc1: add more uses of 'deleter' 2021-05-05 00:06:17 -06:00
marshall.hh libcc1: use variadic templates for "call" 2021-05-05 00:06:16 -06:00
names.cc Update copyright years. 2021-01-04 10:26:59 +01:00
names.hh Update copyright years. 2021-01-04 10:26:59 +01:00
rpc.hh libcc1: add more uses of 'deleter' 2021-05-05 00:06:17 -06:00
status.hh Update copyright years. 2021-01-04 10:26:59 +01:00