LCOV - code coverage report
Current view: top level - gcc - selftest-logical-location.cc (source / functions) Coverage Total Hit
Test: gcc.info Lines: 60.0 % 15 9
Test Date: 2024-12-21 13:15:12 Functions: 50.0 % 6 3
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : /* Concrete subclass of logical_location for use in selftests.
       2                 :             :    Copyright (C) 2024 Free Software Foundation, Inc.
       3                 :             :    Contributed by David Malcolm <dmalcolm@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                 :             : #include "config.h"
      22                 :             : #include "system.h"
      23                 :             : #include "coretypes.h"
      24                 :             : #include "selftest-logical-location.h"
      25                 :             : 
      26                 :             : #if CHECKING_P
      27                 :             : 
      28                 :             : namespace selftest {
      29                 :             : 
      30                 :             : /* class test_logical_location : public logical_location.  */
      31                 :             : 
      32                 :        4652 : test_logical_location::test_logical_location (enum logical_location_kind kind,
      33                 :        4652 :                                               const char *name)
      34                 :        4652 : : m_kind (kind),
      35                 :        4652 :   m_name (name)
      36                 :             : {
      37                 :        4652 : }
      38                 :             : 
      39                 :             : const char *
      40                 :           0 : test_logical_location::get_short_name () const
      41                 :             : {
      42                 :           0 :   return m_name;
      43                 :             : }
      44                 :             : 
      45                 :             : const char *
      46                 :           0 : test_logical_location::get_name_with_scope () const
      47                 :             : {
      48                 :           0 :   return m_name;
      49                 :             : }
      50                 :             : 
      51                 :             : const char *
      52                 :           0 : test_logical_location::get_internal_name () const
      53                 :             : {
      54                 :           0 :   return m_name;
      55                 :             : }
      56                 :             : 
      57                 :             : enum logical_location_kind
      58                 :          16 : test_logical_location::get_kind () const
      59                 :             : {
      60                 :          16 :   return m_kind;
      61                 :             : }
      62                 :             : 
      63                 :             : label_text
      64                 :         148 : test_logical_location::get_name_for_path_output () const
      65                 :             : {
      66                 :         148 :   return label_text::borrow (m_name);
      67                 :             : }
      68                 :             : 
      69                 :             : } // namespace selftest
      70                 :             : 
      71                 :             : #endif /* #if CHECKING_P */
        

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.