Use scope_exit in regcache.c
authorTom Tromey <tom@tromey.com>
Wed, 23 Jan 2019 18:58:37 +0000 (18:58 +0000)
committerPedro Alves <palves@redhat.com>
Wed, 23 Jan 2019 19:14:44 +0000 (19:14 +0000)
commit311dc83a411c83d61cd6cb931289761574ea3ecc
tree6f6ff3deb4eb5b6fccadd5d3667247c7efca060c
parent296bd123f76d7f8474b5a2937a49fd619748a871
Use scope_exit in regcache.c

This removes the regcache_invalidator class in favor of a scope_exit.
This seems like an improvement (albeit a minor one) because
regcache_invalidator is only used in a single spot.

gdb/ChangeLog:
2019-01-23  Tom Tromey  <tom@tromey.com>
    Pedro Alves  <palves@redhat.com>

* regcache.c (class regcache_invalidator): Remove.
(regcache::raw_write): Use make_scope_exit.
gdb/ChangeLog
gdb/regcache.c