libcc1: add deleter objects
authorTom Tromey <tom@tromey.com>
Tue, 4 May 2021 21:26:58 +0000 (15:26 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 5 May 2021 06:06:17 +0000 (00:06 -0600)
commit0d5a0b9af5b9c0f07eabcdb1a7a6454c06cdf8ae
treed808982bd5641a7b977e5b69c33b36edd3aa08e1
parente702c60e65cf9c13587d571cdd158bca74f4c2e2
libcc1: add deleter objects

This adds deleter objects for various kinds of protocol pointers to
libcc1.  Existing specializations of argument_wrapper are then
replaced with a single specialization that handles all pointer types
via the appropriate deleter.  The result here is a bit nicer because
the argument_wrapper boilerplate code is completely shared, leaving
just the memory-management detail to the particular specializations.

libcc1

* rpc.hh (struct deleter): New template class and
specializations.
(argument_wrapper): Remove specializations.  Add specialization
for any pointer type.
libcc1/rpc.hh