diff options
author | Trevor Saunders <tsaunders@mozilla.com> | 2014-06-24 13:21:35 +0000 |
---|---|---|
committer | Trevor Saunders <tbsaunde@gcc.gnu.org> | 2014-06-24 13:21:35 +0000 |
commit | c203e8a73b2f12a1da52a16a0c4a50e62b42445b (patch) | |
tree | b8d7f5b21a14b16949ddbc5dcaeb5f2b2654d63a /gcc/asan.c | |
parent | fbc2a724d481bb5c205baeaaa955533451226d01 (diff) | |
download | gcc-c203e8a73b2f12a1da52a16a0c4a50e62b42445b.zip gcc-c203e8a73b2f12a1da52a16a0c4a50e62b42445b.tar.gz gcc-c203e8a73b2f12a1da52a16a0c4a50e62b42445b.tar.bz2 |
Remove a layer of indirection from hash_table
gcc/
* hash-table.h: Remove a layer of indirection from hash_table so that
it contains the hash table's data instead of a pointer to the data.
* alloc-pool.c, asan.c, attribs.c, bitmap.c, cfg.c,
config/arm/arm.c, config/i386/winnt.c, config/ia64/ia64.c,
config/mips/mips.c, config/sol2.c, coverage.c, cselib.c,
data-streamer-out.c, dse.c, dwarf2cfi.c, dwarf2out.c, except.c,
fold-const.c, gcse.c, ggc-common.c,
gimple-ssa-strength-reduction.c, gimplify.c,
graphite-clast-to-gimple.c, graphite-dependences.c,
graphite-htab.h, graphite.c, haifa-sched.c, ipa-devirt.c,
ipa-profile.c, ira-color.c, ira-costs.c, loop-invariant.c,
loop-iv.c, loop-unroll.c, lto-streamer-in.c, lto-streamer-out.c,
lto-streamer.c, lto-streamer.h, passes.c, plugin.c,
postreload-gcse.c, sese.c, statistics.c, store-motion.c,
trans-mem.c, tree-browser.c, tree-cfg.c, tree-complex.c,
tree-eh.c, tree-into-ssa.c, tree-parloops.c, tree-sra.c,
tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-dom.c,
tree-ssa-live.c, tree-ssa-loop-im.c,
tree-ssa-loop-ivopts.c, tree-ssa-phiopt.c, tree-ssa-pre.c,
tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-strlen.c,
tree-ssa-structalias.c, tree-ssa-tail-merge.c,
tree-ssa-threadupdate.c, tree-ssa-uncprop.c,
tree-vect-data-refs.c, tree-vect-loop.c, tree-vectorizer.c,
tree-vectorizer.h, valtrack.c, valtrack.h, var-tracking.c,
vtable-verify.c, vtable-verify.h: Adjust.
gcc/c/
* c-decl.c: Adjust.
gcc/cp/
* class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
Adjust.
gcc/java/
* jcf-io.c: Adjust.
gcc/lto/
* lto.c: Adjust.
gcc/objc/
* objc-act.c: Adjust.
From-SVN: r211936
Diffstat (limited to 'gcc/asan.c')
-rw-r--r-- | gcc/asan.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -363,18 +363,18 @@ asan_mem_ref_hasher::equal (const asan_mem_ref *m1, && operand_equal_p (m1->start, m2->start, 0)); } -static hash_table <asan_mem_ref_hasher> asan_mem_ref_ht; +static hash_table<asan_mem_ref_hasher> *asan_mem_ref_ht; /* Returns a reference to the hash table containing memory references. This function ensures that the hash table is created. Note that this hash table is updated by the function update_mem_ref_hash_table. */ -static hash_table <asan_mem_ref_hasher> & +static hash_table<asan_mem_ref_hasher> * get_mem_ref_hash_table () { - if (!asan_mem_ref_ht.is_created ()) - asan_mem_ref_ht.create (10); + if (!asan_mem_ref_ht) + asan_mem_ref_ht = new hash_table<asan_mem_ref_hasher> (10); return asan_mem_ref_ht; } @@ -384,8 +384,8 @@ get_mem_ref_hash_table () static void empty_mem_ref_hash_table () { - if (asan_mem_ref_ht.is_created ()) - asan_mem_ref_ht.empty (); + if (asan_mem_ref_ht) + asan_mem_ref_ht->empty (); } /* Free the memory references hash table. */ @@ -393,8 +393,8 @@ empty_mem_ref_hash_table () static void free_mem_ref_resources () { - if (asan_mem_ref_ht.is_created ()) - asan_mem_ref_ht.dispose (); + delete asan_mem_ref_ht; + asan_mem_ref_ht = NULL; if (asan_mem_ref_alloc_pool) { @@ -411,7 +411,7 @@ has_mem_ref_been_instrumented (tree ref, HOST_WIDE_INT access_size) asan_mem_ref r; asan_mem_ref_init (&r, ref, access_size); - return (get_mem_ref_hash_table ().find (&r) != NULL); + return (get_mem_ref_hash_table ()->find (&r) != NULL); } /* Return true iff the memory reference REF has been instrumented. */ @@ -858,12 +858,12 @@ has_stmt_been_instrumented_p (gimple stmt) static void update_mem_ref_hash_table (tree ref, HOST_WIDE_INT access_size) { - hash_table <asan_mem_ref_hasher> ht = get_mem_ref_hash_table (); + hash_table<asan_mem_ref_hasher> *ht = get_mem_ref_hash_table (); asan_mem_ref r; asan_mem_ref_init (&r, ref, access_size); - asan_mem_ref **slot = ht.find_slot (&r, INSERT); + asan_mem_ref **slot = ht->find_slot (&r, INSERT); if (*slot == NULL) *slot = asan_mem_ref_new (ref, access_size); } |