[v2,00/21] C++11-based improvements for libcc1

Message ID 20210428010119.806184-1-tom@tromey.com
Headers show
  • C++11-based improvements for libcc1
Related show


Tom Tromey April 28, 2021, 1 a.m.
Here is v2 of my series to simplify libcc1 through the use of C++11

v1 is here:


I never pinged it because I'd sent it in the wrong stage.

As with v1, this brings libcc1 much closer to how I originally wanted
it to work.  Back then, C++11 couldn't be used, so some things had to
be written in a verbose way.  C++11 brings variadic templates, which
make it possible to simplify this code.

This version of the series brings more improvements.

The plugin for the C++ compiler was apparently written by copying much
of the C compiler code.  However, the original design was to unify
these, and this series eliminates much of the duplication.

This version also removes some manual memory management; typically in
favor of either unique_ptr or vector, but also via custom 'deleter'
classes for the rpc code.

Finally, a couple of minor bugs are fixed along the way.

I built and tested this against git GDB on x86-64 Fedora 32.

Note that the C++ plugin currently does not for git GCC -- it crashes.
This series doesn't make it worse (it may slightly change the reported
failures), but nor does it improve it.