LCOV - code coverage report
Current view: top level - gcc/rust/hir/tree - rust-hir-type-no-bounds.h (source / functions) Coverage Total Hit
Test: gcc.info Lines: 60.0 % 5 3
Test Date: 2026-02-28 14:20:25 Functions: 0.0 % 1 0
Legend: Lines:     hit not hit

            Line data    Source code
       1              : 
       2              : // Copyright (C) 2020-2026 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 RUST_HIR_TYPE_NO_BOUNDS_H
      21              : #define RUST_HIR_TYPE_NO_BOUNDS_H
      22              : 
      23              : #include "rust-hir-type-abstract.h"
      24              : 
      25              : namespace Rust {
      26              : namespace HIR {
      27              : 
      28              : // A type without parentheses? - abstract
      29         3079 : class TypeNoBounds : public Type
      30              : {
      31              : public:
      32              :   // Unique pointer custom clone function
      33              :   std::unique_ptr<TypeNoBounds> clone_type_no_bounds () const
      34              :   {
      35              :     return std::unique_ptr<TypeNoBounds> (clone_type_no_bounds_impl ());
      36              :   }
      37              : 
      38              : protected:
      39        84512 :   TypeNoBounds (Analysis::NodeMapping mappings, location_t locus)
      40        20776 :     : Type (mappings, locus)
      41              :   {}
      42              : 
      43              :   // Clone function implementation as pure virtual method
      44              :   virtual TypeNoBounds *clone_type_no_bounds_impl () const = 0;
      45              : 
      46              :   /* Save having to specify two clone methods in derived classes by making type
      47              :    * clone return typenobounds clone. Hopefully won't affect performance too
      48              :    * much. */
      49            0 :   TypeNoBounds *clone_type_impl () const override
      50              :   {
      51            0 :     return clone_type_no_bounds_impl ();
      52              :   }
      53              : };
      54              : 
      55              : } // namespace HIR
      56              : } // namespace Rust
      57              : 
      58              : #endif
        

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.