LCOV - code coverage report
Current view: top level - gcc - range.h (source / functions) Coverage Total Hit
Test: gcc.info Lines: 100.0 % 11 11
Test Date: 2026-02-28 14:20:25 Functions: 100.0 % 3 3
Legend: Lines:     hit not hit

            Line data    Source code
       1              : /* Header file for misc range functions. -*- C++ -*-
       2              :    Copyright (C) 2017-2026 Free Software Foundation, Inc.
       3              :    Contributed by Aldy Hernandez <aldyh@redhat.com>.
       4              : 
       5              : This file is part of GCC.
       6              : 
       7              : GCC is free software; you can redistribute it and/or modify it under
       8              : the terms of the GNU General Public License as published by the Free
       9              : Software Foundation; either version 3, or (at your option) any later
      10              : version.
      11              : 
      12              : GCC is distributed in the hope that it will be useful, but WITHOUT ANY
      13              : WARRANTY; without even the implied warranty of MERCHANTABILITY or
      14              : FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      15              :  for more details.
      16              : 
      17              : You should have received a copy of the GNU General Public License
      18              : along with GCC; see the file COPYING3.  If not see
      19              : <http://www.gnu.org/licenses/>.  */
      20              : 
      21              : #ifndef GCC_RANGE_H
      22              : #define GCC_RANGE_H
      23              : 
      24              : int_range<2> range_positives (tree type);
      25              : int_range<2> range_negatives (tree type);
      26              : 
      27              : // Return an irange instance that is a boolean TRUE.
      28              : 
      29              : inline int_range<1>
      30    198624033 : range_true (tree type = boolean_type_node)
      31              : {
      32    198624033 :   unsigned prec = TYPE_PRECISION (type);
      33    198624033 :   return int_range<1> (type, wi::one (prec), wi::one (prec));
      34              : }
      35              : 
      36              : // Return an irange instance that is a boolean FALSE.
      37              : 
      38              : inline int_range<1>
      39    200110930 : range_false (tree type = boolean_type_node)
      40              : {
      41    200110930 :   unsigned prec = TYPE_PRECISION (type);
      42    200110930 :   return int_range<1> (type, wi::zero (prec), wi::zero (prec));
      43              : }
      44              : 
      45              : // Return an irange that covers both true and false.
      46              : 
      47              : inline int_range<1>
      48    105563687 : range_true_and_false (tree type = boolean_type_node)
      49              : {
      50    105563687 :   unsigned prec = TYPE_PRECISION (type);
      51    105563687 :   if (prec == 1)
      52     86510288 :     return int_range<1> (type);
      53     19053887 :   return int_range<1> (type, wi::zero (prec), wi::one (prec));
      54              : }
      55              : 
      56              : #endif // GCC_RANGE_H
        

Generated by: LCOV version 2.4-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.