LCOV - code coverage report
Current view: top level - /mnt/build/buildbot/bld/build-lcov/gcc/m2/gm2-compiler-boot - M2Defaults.c (source / functions) Coverage Total Hit
Test: gcc.info Lines: 11.1 % 18 2
Test Date: 2026-02-28 14:20:25 Functions: 25.0 % 4 1
Legend: Lines:     hit not hit

            Line data    Source code
       1              : /* do not edit automatically generated by mc from M2Defaults.  */
       2              : /* M2Defaults.mod provides path and argument defaults.
       3              : 
       4              : Copyright (C) 2001-2026 Free Software Foundation, Inc.
       5              : Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
       6              : 
       7              : This file is part of GNU Modula-2.
       8              : 
       9              : GNU Modula-2 is free software; you can redistribute it and/or modify
      10              : it under the terms of the GNU General Public License as published by
      11              : the Free Software Foundation; either version 3, or (at your option)
      12              : any later version.
      13              : 
      14              : GNU Modula-2 is distributed in the hope that it will be useful, but
      15              : WITHOUT ANY WARRANTY; without even the implied warranty of
      16              : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      17              : General Public License for more details.
      18              : 
      19              : You should have received a copy of the GNU General Public License
      20              : along with GNU Modula-2; see the file COPYING3.  If not see
      21              : <http://www.gnu.org/licenses/>.  */
      22              : 
      23              : #include "config.h"
      24              : #include "system.h"
      25              : #include <stdbool.h>
      26              : #   if !defined (PROC_D)
      27              : #      define PROC_D
      28              :        typedef void (*PROC_t) (void);
      29              :        typedef struct { PROC_t proc; } PROC;
      30              : #   endif
      31              : 
      32              : #define _M2Defaults_C
      33              : 
      34              : #include "GM2Defaults.h"
      35              : #   include "GDynamicStrings.h"
      36              : #   include "GSEnvironment.h"
      37              : 
      38              : 
      39              : /*
      40              :    GetSearchPath - sets string, a, to the environment variable
      41              :                    M2PATH.
      42              : */
      43              : 
      44              : extern "C" DynamicStrings_String M2Defaults_GetSearchPath (void);
      45              : 
      46              : /*
      47              :    GetOptions - returns a string, which is a copy of the environment variable
      48              :                 M2OPTIONS
      49              : */
      50              : 
      51              : extern "C" DynamicStrings_String M2Defaults_GetOptions (void);
      52              : 
      53              : 
      54              : /*
      55              :    GetSearchPath - sets string, a, to the environment variable
      56              :                    M2PATH.
      57              : */
      58              : 
      59            0 : extern "C" DynamicStrings_String M2Defaults_GetSearchPath (void)
      60              : {
      61            0 :   DynamicStrings_String s;
      62            0 :   DynamicStrings_String p;
      63              : 
      64            0 :   s = DynamicStrings_InitString ((const char *) "M2PATH", 6);
      65            0 :   if (SEnvironment_GetEnvironment (s, &p))
      66              :     {}  /* empty.  */
      67            0 :   s = DynamicStrings_KillString (s);
      68            0 :   return p;
      69              :   /* static analysis guarentees a RETURN statement will be used before here.  */
      70              :   __builtin_unreachable ();
      71              : }
      72              : 
      73              : 
      74              : /*
      75              :    GetOptions - returns a string, which is a copy of the environment variable
      76              :                 M2OPTIONS
      77              : */
      78              : 
      79            0 : extern "C" DynamicStrings_String M2Defaults_GetOptions (void)
      80              : {
      81            0 :   DynamicStrings_String s;
      82            0 :   DynamicStrings_String p;
      83              : 
      84            0 :   s = DynamicStrings_InitString ((const char *) "M2OPTIONS", 9);
      85            0 :   if (SEnvironment_GetEnvironment (s, &p))
      86              :     {}  /* empty.  */
      87            0 :   s = DynamicStrings_KillString (s);
      88            0 :   return p;
      89              :   /* static analysis guarentees a RETURN statement will be used before here.  */
      90              :   __builtin_unreachable ();
      91              : }
      92              : 
      93        14952 : extern "C" void _M2_M2Defaults_init (__attribute__((unused)) int argc, __attribute__((unused)) char *argv[], __attribute__((unused)) char *envp[])
      94              : {
      95        14952 : }
      96              : 
      97            0 : extern "C" void _M2_M2Defaults_fini (__attribute__((unused)) int argc, __attribute__((unused)) char *argv[], __attribute__((unused)) char *envp[])
      98              : {
      99            0 : }
        

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.