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

            Line data    Source code
       1              : /* Support for virtual clones in symbol table.
       2              :    Copyright (C) 2003-2026 Free Software Foundation, Inc.
       3              :    Contributed by Jan Hubicka
       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 "backend.h"
      25              : #include "tree.h"
      26              : #include "gimple.h"
      27              : #include "predict.h"
      28              : #include "target.h"
      29              : #include "rtl.h"
      30              : #include "alloc-pool.h"
      31              : #include "cgraph.h"
      32              : #include "symbol-summary.h"
      33              : #include "symtab-clones.h"
      34              : #include "lto-streamer.h"
      35              : #include "data-streamer.h"
      36              : 
      37              : namespace {
      38              : 
      39              : /* Function summary for clone_infos.  */
      40              : class GTY((user)) clone_infos_t: public function_summary <clone_info *>
      41              : {
      42              : public:
      43              :   clone_infos_t (symbol_table *table, bool ggc):
      44              :     function_summary<clone_info *> (table, ggc) { }
      45              : };
      46              : 
      47              : }  /* anon namespace  */
      48              : 
      49              : /* Return thunk_info possibly creating new one.  */
      50              : clone_info *
      51       469081 : clone_info::get_create (cgraph_node *node)
      52              : {
      53       469081 :   if (!symtab->m_clones)
      54              :     {
      55        39828 :       symtab->m_clones
      56        19914 :          = new (ggc_alloc_no_dtor <function_summary <clone_info *>> ())
      57        19914 :              function_summary <clone_info *> (symtab, true);
      58        19914 :       symtab->m_clones->disable_insertion_hook ();
      59        19914 :       symtab->m_clones->disable_duplication_hook ();
      60              :     }
      61       469081 :   return symtab->m_clones->get_create (node);
      62              : }
        

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.