LCOV - code coverage report
Current view: top level - gcc - tree-hash-traits.h (source / functions) Coverage Total Hit
Test: gcc.info Lines: 100.0 % 4 4
Test Date: 2024-12-21 13:15:12 Functions: 100.0 % 1 1
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : /* Traits for hashing trees.
       2                 :             :    Copyright (C) 2014-2024 Free Software Foundation, Inc.
       3                 :             : 
       4                 :             : This file is part of GCC.
       5                 :             : 
       6                 :             : GCC is free software; you can redistribute it and/or modify it under
       7                 :             : the terms of the GNU General Public License as published by the Free
       8                 :             : Software Foundation; either version 3, or (at your option) any later
       9                 :             : version.
      10                 :             : 
      11                 :             : GCC is distributed in the hope that it will be useful, but WITHOUT ANY
      12                 :             : WARRANTY; without even the implied warranty of MERCHANTABILITY or
      13                 :             : FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      14                 :             : for more details.
      15                 :             : 
      16                 :             : You should have received a copy of the GNU General Public License
      17                 :             : along with GCC; see the file COPYING3.  If not see
      18                 :             : <http://www.gnu.org/licenses/>.  */
      19                 :             : 
      20                 :             : #ifndef tree_hash_traits_h
      21                 :             : #define tree_hash_traits_h
      22                 :             : 
      23                 :             : /* Hash for trees based on operand_equal_p.  */
      24                 :             : struct tree_operand_hash : ggc_ptr_hash <tree_node>
      25                 :             : {
      26                 :             :   static inline hashval_t hash (const value_type &);
      27                 :             :   static inline bool equal (const value_type &,
      28                 :             :                             const compare_type &);
      29                 :             : };
      30                 :             : 
      31                 :             : inline hashval_t
      32                 :    45487293 : tree_operand_hash::hash (const value_type &t)
      33                 :             : {
      34                 :    45487293 :   return iterative_hash_expr (t, 0);
      35                 :             : }
      36                 :             : 
      37                 :             : inline bool
      38                 :    30738169 : tree_operand_hash::equal (const value_type &t1,
      39                 :             :                           const compare_type &t2)
      40                 :             : {
      41                 :    30738169 :   return operand_equal_p (t1, t2, 0);
      42                 :             : }
      43                 :             : 
      44                 :             : #endif
        

Generated by: LCOV version 2.1-beta

LCOV profile is generated on x86_64 machine using following configure options: configure --disable-bootstrap --enable-coverage=opt --enable-languages=c,c++,fortran,go,jit,lto,rust,m2 --enable-host-shared. GCC test suite is run with the built compiler.