Use unique_ptr for htabs
authorKeith Seitz <keiths@redhat.com>
Fri, 10 Aug 2018 17:53:47 +0000 (10:53 -0700)
committerKeith Seitz <keiths@redhat.com>
Fri, 10 Aug 2018 18:14:25 +0000 (11:14 -0700)
commit0cfbf43085c4191f3f4b4b4a834f1e19bf42d4a9
tree3ce376cc5de9974010c884076fdb127014aeed28
parent946d3d10e7609e074be30db8662cb9c4a3d8961d
Use unique_ptr for htabs

This patch updates the type-conversion caching in C compile to use
unique pointers.  This patch also removes the on-demand allocation of the
symbol error map in favor of initialization, simplifying the code.

gdb/ChangeLog
        * compile/compile-internal.h (compile_instance::~compile_instance):
        Remove calls to htab_delete.
        <m_type_map, m_symbol_err_map>: Switch type to htab_up.
        * compile.c (compile_instance::compile_instance): Initialize
        htab unique pointers.
        (compile_instance::get_cached_type, compile_instance::insert_type)
        (compile_instance::error_symbol_once): Update for unique_ptr.
gdb/ChangeLog
gdb/compile/compile-internal.h
gdb/compile/compile.c
This page took 0.024826 seconds and 4 git commands to generate.