LCOV - code coverage report
Current view: top level - gcc/rust - rust-lang.cc (source / functions) Coverage Total Hit
Test: gcc.info Lines: 72.2 % 126 91
Test Date: 2024-04-20 14:03:02 Functions: 77.8 % 18 14
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : // Copyright (C) 2020-2024 Free Software Foundation, Inc.
       2                 :             : 
       3                 :             : // This file is part of GCC.
       4                 :             : 
       5                 :             : // GCC is free software; you can redistribute it and/or modify it under
       6                 :             : // the terms of the GNU General Public License as published by the Free
       7                 :             : // Software Foundation; either version 3, or (at your option) any later
       8                 :             : // version.
       9                 :             : 
      10                 :             : // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
      11                 :             : // WARRANTY; without even the implied warranty of MERCHANTABILITY or
      12                 :             : // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      13                 :             : // for more details.
      14                 :             : 
      15                 :             : // You should have received a copy of the GNU General Public License
      16                 :             : // along with GCC; see the file COPYING3.  If not see
      17                 :             : // <http://www.gnu.org/licenses/>.
      18                 :             : 
      19                 :             : #include "rust-system.h"
      20                 :             : #include "rust-diagnostics.h"
      21                 :             : #include "coretypes.h"
      22                 :             : #include "target.h"
      23                 :             : #include "tree.h"
      24                 :             : #include "gimple-expr.h"
      25                 :             : #include "diagnostic.h"
      26                 :             : #include "opts.h"
      27                 :             : #include "fold-const.h"
      28                 :             : #include "gimplify.h"
      29                 :             : #include "stor-layout.h"
      30                 :             : #include "debug.h"
      31                 :             : #include "convert.h"
      32                 :             : #include "langhooks.h"
      33                 :             : #include "langhooks-def.h"
      34                 :             : #include "selftest.h"
      35                 :             : #include "rust-cfg-parser.h"
      36                 :             : #include "rust-privacy-ctx.h"
      37                 :             : #include "rust-ast-resolve-item.h"
      38                 :             : #include "rust-lex.h"
      39                 :             : #include "optional.h"
      40                 :             : #include "rust-unicode.h"
      41                 :             : #include "rust-punycode.h"
      42                 :             : 
      43                 :             : #include <mpfr.h>
      44                 :             : // note: header files must be in this order or else forward declarations don't
      45                 :             : // work properly. Kinda dumb system, but have to live with it. clang-format
      46                 :             : // seems to mess it up
      47                 :             : /* Order: config, system, coretypes, target, tree, gimple-expr, diagnostic,
      48                 :             :  * opts, fold-const, gimplify, stor-layout, debug, convert, langhooks,
      49                 :             :  * langhooks-def */
      50                 :             : 
      51                 :             : // FIXME: test saving intellisense
      52                 :             : #include "options.h"
      53                 :             : 
      54                 :             : // version check to stop compiling if c++ isn't c++11 or higher
      55                 :             : #if __cplusplus < 201103
      56                 :             : #error                                                                         \
      57                 :             :   "GCC Rust frontend requires C++11 or higher. You can compile the g++ frontend first and then compile the Rust frontend using that."
      58                 :             : #endif
      59                 :             : // TODO: is this best way to do it? Is it allowed? (should be)
      60                 :             : 
      61                 :             : /* General TODOs:
      62                 :             :  *  - convert all copies of expensive-to-copy (deep copy) AST objects into
      63                 :             :  * moves, if possible. Don't remove clone functionality - it may be required for
      64                 :             :  * e.g. HIR conversion.
      65                 :             :  */
      66                 :             : 
      67                 :             : #include "rust-session-manager.h"
      68                 :             : #include "rust-tree.h"
      69                 :             : 
      70                 :             : // The resulting tree type.
      71                 :             : union GTY ((
      72                 :             :   desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
      73                 :             :   chain_next (
      74                 :             :     "CODE_CONTAINS_STRUCT (TREE_CODE (&%h.generic), "
      75                 :             :     "TS_COMMON) ? ((union lang_tree_node *) TREE_CHAIN (&%h.generic)) : NULL")))
      76                 :             :   lang_tree_node
      77                 :             : {
      78                 :             :   union tree_node GTY ((tag ("0"), desc ("tree_node_structure (&%h)"))) generic;
      79                 :             :   struct lang_identifier GTY ((tag ("1"))) identifier;
      80                 :             : };
      81                 :             : 
      82                 :             : // has to be in same compilation unit as session, so here for now
      83                 :             : void
      84                 :       33264 : rust_add_target_info (const char *key, const char *value)
      85                 :             : {
      86                 :       33264 :   Rust::Session::get_instance ().options.target_data.insert_key_value_pair (
      87                 :             :     key, value);
      88                 :       33264 : }
      89                 :             : 
      90                 :             : /* Language hooks.  */
      91                 :             : 
      92                 :             : /* Initial lang hook called (possibly), used for initialisation.
      93                 :             :  * Must call build_common_tree_nodes, set_sizetype, build_common_tree_nodes_2,
      94                 :             :  * and build_common_builtin_nodes, as well as set global variable
      95                 :             :  * void_list_node. Apparently called after option handling? */
      96                 :             : static bool
      97                 :        3696 : grs_langhook_init (void)
      98                 :             : {
      99                 :             :   /* Something to do with this:
     100                 :             :    This allows the code in d-builtins.cc to not have to worry about
     101                 :             :    converting (C signed char *) to (D char *) for string arguments of
     102                 :             :    built-in functions. The parameter (signed_char = false) specifies
     103                 :             :    whether char is signed.  */
     104                 :        3696 :   build_common_tree_nodes (false);
     105                 :             : 
     106                 :             :   // Builds built-ins for middle-end after all front-end built-ins are already
     107                 :             :   // instantiated
     108                 :        3696 :   build_common_builtin_nodes ();
     109                 :             : 
     110                 :        3696 :   mpfr_set_default_prec (128);
     111                 :             : 
     112                 :        3696 :   using_eh_for_cleanups ();
     113                 :             : 
     114                 :             :   // initialise compiler session
     115                 :        3696 :   Rust::Session::get_instance ().init ();
     116                 :             : 
     117                 :        3696 :   return true;
     118                 :             : }
     119                 :             : 
     120                 :             : /* The option mask (something to do with options for specific frontends or
     121                 :             :  * something). */
     122                 :             : static unsigned int
     123                 :       11201 : grs_langhook_option_lang_mask (void)
     124                 :             : {
     125                 :       11201 :   return CL_Rust;
     126                 :             : }
     127                 :             : 
     128                 :             : /* Initialize the options structure. */
     129                 :             : static void
     130                 :        3697 : grs_langhook_init_options_struct (struct gcc_options *opts)
     131                 :             : {
     132                 :             :   /* Operations are always wrapping in Rust, even on signed integer. This is
     133                 :             :    * useful for the low level wrapping_{add, sub, mul} intrinsics, not for
     134                 :             :    * regular arithmetic operations which are checked for overflow anyway using
     135                 :             :    * builtins */
     136                 :        3697 :   opts->x_flag_wrapv = 1;
     137                 :             : 
     138                 :             :   /* We need to warn on unused variables by default */
     139                 :        3697 :   opts->x_warn_unused_variable = 1;
     140                 :             :   /* For const variables too */
     141                 :        3697 :   opts->x_warn_unused_const_variable = 1;
     142                 :             :   /* And finally unused result for #[must_use] */
     143                 :        3697 :   opts->x_warn_unused_result = 1;
     144                 :             :   /* lets warn for infinite recursion*/
     145                 :        3697 :   opts->x_warn_infinite_recursion = 1;
     146                 :             : 
     147                 :             :   // nothing yet - used by frontends to change specific options for the language
     148                 :        3697 :   Rust::Session::get_instance ().init_options ();
     149                 :        3697 : }
     150                 :             : 
     151                 :             : /* Main entry point for front-end, apparently. Finds input file names in global
     152                 :             :  * vars in_fnames and num_in_fnames. From this, frontend can take over and do
     153                 :             :  * actual parsing and initial compilation. This function must create a complete
     154                 :             :  * parse tree in a global var, and then return.
     155                 :             :  *
     156                 :             :  * Some consider this the "start of compilation". */
     157                 :             : static void
     158                 :        3696 : grs_langhook_parse_file (void)
     159                 :             : {
     160                 :        3696 :   rust_debug ("Preparing to parse files. ");
     161                 :             : 
     162                 :        3696 :   Rust::Session::get_instance ().handle_input_files (num_in_fnames, in_fnames);
     163                 :        3692 : }
     164                 :             : 
     165                 :             : /* Seems to get the exact type for a specific type - e.g. for scalar float with
     166                 :             :  * 32-bit bitsize, it returns float, and for 64-bit bitsize, it returns double.
     167                 :             :  * Used to map RTL nodes to machine modes or something like that. */
     168                 :             : static tree
     169                 :       29016 : grs_langhook_type_for_mode (machine_mode mode, int unsignedp)
     170                 :             : {
     171                 :             :   // TODO: change all this later to match rustc types
     172                 :       29016 :   if (mode == TYPE_MODE (float_type_node))
     173                 :           0 :     return float_type_node;
     174                 :             : 
     175                 :       29016 :   if (mode == TYPE_MODE (double_type_node))
     176                 :           0 :     return double_type_node;
     177                 :             : 
     178                 :       29016 :   if (mode == TYPE_MODE (intQI_type_node)) // quarter integer mode - single byte
     179                 :             :                                            // treated as integer
     180                 :           0 :     return unsignedp ? unsigned_intQI_type_node : intQI_type_node;
     181                 :       29016 :   if (mode
     182                 :       29016 :       == TYPE_MODE (intHI_type_node)) // half integer mode - two-byte integer
     183                 :           0 :     return unsignedp ? unsigned_intHI_type_node : intHI_type_node;
     184                 :       29016 :   if (mode
     185                 :       29016 :       == TYPE_MODE (intSI_type_node)) // single integer mode - four-byte integer
     186                 :          15 :     return unsignedp ? unsigned_intSI_type_node : intSI_type_node;
     187                 :       29001 :   if (mode
     188                 :       29001 :       == TYPE_MODE (
     189                 :             :         intDI_type_node)) // double integer mode - eight-byte integer
     190                 :        6808 :     return unsignedp ? unsigned_intDI_type_node : intDI_type_node;
     191                 :       22193 :   if (mode
     192                 :       22193 :       == TYPE_MODE (intTI_type_node)) // tetra integer mode - 16-byte integer
     193                 :          17 :     return unsignedp ? unsigned_intTI_type_node : intTI_type_node;
     194                 :             : 
     195                 :       22176 :   if (mode == TYPE_MODE (integer_type_node))
     196                 :           0 :     return unsignedp ? unsigned_type_node : integer_type_node;
     197                 :             : 
     198                 :       22176 :   if (mode == TYPE_MODE (long_integer_type_node))
     199                 :           0 :     return unsignedp ? long_unsigned_type_node : long_integer_type_node;
     200                 :             : 
     201                 :       22176 :   if (mode == TYPE_MODE (long_long_integer_type_node))
     202                 :           0 :     return unsignedp ? long_long_unsigned_type_node
     203                 :           0 :                      : long_long_integer_type_node;
     204                 :             : 
     205                 :       22176 :   if (COMPLEX_MODE_P (mode))
     206                 :             :     {
     207                 :       22176 :       if (mode == TYPE_MODE (complex_float_type_node))
     208                 :        3696 :         return complex_float_type_node;
     209                 :       18480 :       if (mode == TYPE_MODE (complex_double_type_node))
     210                 :        3696 :         return complex_double_type_node;
     211                 :       14784 :       if (mode == TYPE_MODE (complex_long_double_type_node))
     212                 :        3696 :         return complex_long_double_type_node;
     213                 :       11088 :       if (mode == TYPE_MODE (complex_integer_type_node) && !unsignedp)
     214                 :           0 :         return complex_integer_type_node;
     215                 :             :     }
     216                 :             : 
     217                 :             :   /* See (a) <https://github.com/Rust-GCC/gccrs/issues/1713>
     218                 :             :      "Test failure on msp430-elfbare target", and
     219                 :             :      (b) <https://gcc.gnu.org/PR46805>
     220                 :             :      "ICE: SIGSEGV in optab_for_tree_code (optabs.c:407) with -O
     221                 :             :      -fno-tree-scev-cprop -ftree-vectorize"
     222                 :             :      -- we have to support "random" modes/types here.
     223                 :             :      TODO Clean all this up (either locally, or preferably per PR46805:
     224                 :             :      "Ideally we'd never use lang_hooks.types.type_for_mode (or _for_size) in
     225                 :             :      the middle-end but had a pure middle-end based implementation".  */
     226                 :       22176 :   for (size_t i = 0; i < NUM_INT_N_ENTS; i++)
     227                 :       11088 :     if (int_n_enabled_p[i] && mode == int_n_data[i].m)
     228                 :           0 :       return (unsignedp ? int_n_trees[i].unsigned_type
     229                 :           0 :                         : int_n_trees[i].signed_type);
     230                 :             : 
     231                 :             :   /* rust_unreachable */
     232                 :             :   return NULL;
     233                 :             : }
     234                 :             : 
     235                 :             : // Record a builtin function. We just ignore builtin functions.
     236                 :             : static tree
     237                 :     1513636 : grs_langhook_builtin_function (tree decl ATTRIBUTE_UNUSED)
     238                 :             : {
     239                 :     1513636 :   return decl;
     240                 :             : }
     241                 :             : 
     242                 :             : /* Return true if we are in the global binding level (which is never,
     243                 :             :  * apparently). */
     244                 :             : static bool
     245                 :         132 : grs_langhook_global_bindings_p (void)
     246                 :             : {
     247                 :             :   // return current_function_decl == NULL_TREE;
     248                 :             :   // rust_unreachable();
     249                 :             :   // return true;
     250                 :         132 :   return false;
     251                 :             : }
     252                 :             : 
     253                 :             : /* Push a declaration into the current binding level.  We can't
     254                 :             :    usefully implement this since we don't want to convert from tree
     255                 :             :    back to one of our internal data structures.  I think the only way
     256                 :             :    this is used is to record a decl which is to be returned by
     257                 :             :    getdecls, and we could implement it for that purpose if
     258                 :             :    necessary.  */
     259                 :             : static tree
     260                 :           0 : grs_langhook_pushdecl (tree decl ATTRIBUTE_UNUSED)
     261                 :             : {
     262                 :           0 :   rust_unreachable ();
     263                 :             :   return NULL;
     264                 :             : }
     265                 :             : 
     266                 :             : /* This hook is used to get the current list of declarations as trees.
     267                 :             :    We don't support that; instead we use the write_globals hook.  This
     268                 :             :    can't simply crash because it is called by -gstabs.  */
     269                 :             : static tree
     270                 :           0 : grs_langhook_getdecls (void)
     271                 :             : {
     272                 :             :   // rust_unreachable();
     273                 :           0 :   return NULL;
     274                 :             : }
     275                 :             : 
     276                 :             : // Handle Rust-specific options. Return false if nothing happened.
     277                 :             : static bool
     278                 :       26020 : grs_langhook_handle_option (
     279                 :             :   size_t scode, const char *arg, HOST_WIDE_INT value, int kind ATTRIBUTE_UNUSED,
     280                 :             :   location_t loc ATTRIBUTE_UNUSED,
     281                 :             :   const struct cl_option_handlers *handlers ATTRIBUTE_UNUSED)
     282                 :             : {
     283                 :             :   // Convert integer code to lang.opt enum codes with names.
     284                 :       26020 :   enum opt_code code = (enum opt_code) scode;
     285                 :             : 
     286                 :             :   // Delegate to session manager
     287                 :       26020 :   return Rust::Session::get_instance ().handle_option (code, arg, value, kind,
     288                 :       26020 :                                                        loc, handlers);
     289                 :             : }
     290                 :             : 
     291                 :             : /* Run after parsing options.  */
     292                 :             : static bool
     293                 :        3697 : grs_langhook_post_options (const char **pfilename ATTRIBUTE_UNUSED)
     294                 :             : {
     295                 :             :   // can be used to override other options if required
     296                 :             : 
     297                 :             :   // satisfies an assert in init_excess_precision in toplev.cc
     298                 :        3697 :   if (flag_excess_precision /*_cmdline*/ == EXCESS_PRECISION_DEFAULT)
     299                 :        3697 :     flag_excess_precision /*_cmdline*/ = EXCESS_PRECISION_STANDARD;
     300                 :             : 
     301                 :             :   /* Returning false means that the backend should be used.  */
     302                 :        3697 :   return false;
     303                 :             : }
     304                 :             : 
     305                 :             : /* Rust-specific gimplification. May need to gimplify e.g.
     306                 :             :  * CALL_EXPR_STATIC_CHAIN */
     307                 :             : static int
     308                 :      330639 : grs_langhook_gimplify_expr (tree *expr_p ATTRIBUTE_UNUSED,
     309                 :             :                             gimple_seq *pre_p ATTRIBUTE_UNUSED,
     310                 :             :                             gimple_seq *post_p ATTRIBUTE_UNUSED)
     311                 :             : {
     312                 :      330639 :   if (TREE_CODE (*expr_p) == CALL_EXPR
     313                 :      330639 :       && CALL_EXPR_STATIC_CHAIN (*expr_p) != NULL_TREE)
     314                 :           0 :     gimplify_expr (&CALL_EXPR_STATIC_CHAIN (*expr_p), pre_p, post_p,
     315                 :             :                    is_gimple_val, fb_rvalue);
     316                 :      330639 :   return GS_UNHANDLED;
     317                 :             : }
     318                 :             : 
     319                 :             : static tree
     320                 :           0 : grs_langhook_eh_personality (void)
     321                 :             : {
     322                 :           0 :   static tree personality_decl;
     323                 :           0 :   if (personality_decl == NULL_TREE)
     324                 :             :     {
     325                 :           0 :       personality_decl = build_personality_function ("gccrs");
     326                 :           0 :       rust_preserve_from_gc (personality_decl);
     327                 :             :     }
     328                 :           0 :   return personality_decl;
     329                 :             : }
     330                 :             : 
     331                 :             : tree
     332                 :         196 : convert (tree type, tree expr)
     333                 :             : {
     334                 :         196 :   if (type == error_mark_node || expr == error_mark_node
     335                 :         392 :       || TREE_TYPE (expr) == error_mark_node)
     336                 :             :     return error_mark_node;
     337                 :             : 
     338                 :         196 :   if (type == TREE_TYPE (expr))
     339                 :             :     return expr;
     340                 :             : 
     341                 :         196 :   if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (expr)))
     342                 :           0 :     return fold_convert (type, expr);
     343                 :             : 
     344                 :         196 :   switch (TREE_CODE (type))
     345                 :             :     {
     346                 :           0 :     case VOID_TYPE:
     347                 :           0 :     case BOOLEAN_TYPE:
     348                 :           0 :       return fold_convert (type, expr);
     349                 :          98 :     case INTEGER_TYPE:
     350                 :          98 :       return convert_to_integer (type, expr);
     351                 :          98 :     case POINTER_TYPE:
     352                 :          98 :       return convert_to_pointer (type, expr);
     353                 :           0 :     case REAL_TYPE:
     354                 :           0 :       return convert_to_real (type, expr);
     355                 :           0 :     case COMPLEX_TYPE:
     356                 :           0 :       return convert_to_complex (type, expr);
     357                 :           0 :     default:
     358                 :           0 :       break;
     359                 :             :     }
     360                 :             : 
     361                 :           0 :   rust_unreachable ();
     362                 :             : }
     363                 :             : 
     364                 :             : /* FIXME: This is a hack to preserve trees that we create from the
     365                 :             :    garbage collector.  */
     366                 :             : 
     367                 :             : static GTY (()) tree rust_gc_root;
     368                 :             : 
     369                 :             : void
     370                 :      101457 : rust_preserve_from_gc (tree t)
     371                 :             : {
     372                 :      101457 :   rust_gc_root = tree_cons (NULL_TREE, t, rust_gc_root);
     373                 :      101457 : }
     374                 :             : 
     375                 :             : /* Convert an identifier for use in an error message.  */
     376                 :             : 
     377                 :             : const char *
     378                 :           0 : rust_localize_identifier (const char *ident)
     379                 :             : {
     380                 :           0 :   return identifier_to_locale (ident);
     381                 :             : }
     382                 :             : 
     383                 :             : extern const attribute_spec grs_langhook_common_attribute_table[];
     384                 :             : 
     385                 :             : /* The language hooks data structure. This is the main interface between the GCC
     386                 :             :  * front-end and the GCC middle-end/back-end. A list of language hooks could be
     387                 :             :  * found in <gcc>/langhooks.h
     388                 :             :  */
     389                 :             : #undef LANG_HOOKS_NAME
     390                 :             : #undef LANG_HOOKS_INIT
     391                 :             : #undef LANG_HOOKS_OPTION_LANG_MASK
     392                 :             : #undef LANG_HOOKS_INIT_OPTIONS_STRUCT
     393                 :             : #undef LANG_HOOKS_HANDLE_OPTION
     394                 :             : #undef LANG_HOOKS_POST_OPTIONS
     395                 :             : #undef LANG_HOOKS_PARSE_FILE
     396                 :             : #undef LANG_HOOKS_TYPE_FOR_MODE
     397                 :             : #undef LANG_HOOKS_BUILTIN_FUNCTION
     398                 :             : #undef LANG_HOOKS_GLOBAL_BINDINGS_P
     399                 :             : #undef LANG_HOOKS_PUSHDECL
     400                 :             : #undef LANG_HOOKS_GETDECLS
     401                 :             : #undef LANG_HOOKS_WRITE_GLOBALS
     402                 :             : #undef LANG_HOOKS_GIMPLIFY_EXPR
     403                 :             : #undef LANG_HOOKS_EH_PERSONALITY
     404                 :             : 
     405                 :             : #undef LANG_HOOKS_COMMON_ATTRIBUTE_TABLE
     406                 :             : 
     407                 :             : #define LANG_HOOKS_NAME "GNU Rust"
     408                 :             : #define LANG_HOOKS_INIT grs_langhook_init
     409                 :             : #define LANG_HOOKS_OPTION_LANG_MASK grs_langhook_option_lang_mask
     410                 :             : #define LANG_HOOKS_INIT_OPTIONS_STRUCT grs_langhook_init_options_struct
     411                 :             : #define LANG_HOOKS_HANDLE_OPTION grs_langhook_handle_option
     412                 :             : #define LANG_HOOKS_POST_OPTIONS grs_langhook_post_options
     413                 :             : /* Main lang-hook, apparently. Finds input file names in global vars in_fnames
     414                 :             :  * and num_in_fnames From this, frontend can take over and do actual parsing and
     415                 :             :  * initial compilation.
     416                 :             :  * This hook must create a complete parse tree in a global var, and then return.
     417                 :             :  */
     418                 :             : #define LANG_HOOKS_PARSE_FILE grs_langhook_parse_file
     419                 :             : #define LANG_HOOKS_TYPE_FOR_MODE grs_langhook_type_for_mode
     420                 :             : #define LANG_HOOKS_BUILTIN_FUNCTION grs_langhook_builtin_function
     421                 :             : #define LANG_HOOKS_GLOBAL_BINDINGS_P grs_langhook_global_bindings_p
     422                 :             : #define LANG_HOOKS_PUSHDECL grs_langhook_pushdecl
     423                 :             : #define LANG_HOOKS_GETDECLS grs_langhook_getdecls
     424                 :             : #define LANG_HOOKS_GIMPLIFY_EXPR grs_langhook_gimplify_expr
     425                 :             : #define LANG_HOOKS_EH_PERSONALITY grs_langhook_eh_personality
     426                 :             : 
     427                 :             : #define LANG_HOOKS_COMMON_ATTRIBUTE_TABLE grs_langhook_common_attribute_table
     428                 :             : 
     429                 :             : #if CHECKING_P
     430                 :             : 
     431                 :             : #undef LANG_HOOKS_RUN_LANG_SELFTESTS
     432                 :             : #define LANG_HOOKS_RUN_LANG_SELFTESTS selftest::run_rust_tests
     433                 :             : 
     434                 :             : namespace selftest {
     435                 :             : 
     436                 :             : void
     437                 :           1 : run_rust_tests ()
     438                 :             : {
     439                 :             :   // Call tests for the rust frontend here
     440                 :           1 :   rust_input_source_test ();
     441                 :           1 :   rust_nfc_qc_test ();
     442                 :           1 :   rust_utf8_normalize_test ();
     443                 :           1 :   rust_punycode_encode_test ();
     444                 :           1 :   rust_cfg_parser_test ();
     445                 :           1 :   rust_privacy_ctx_test ();
     446                 :           1 :   rust_crate_name_validation_test ();
     447                 :           1 :   rust_simple_path_resolve_test ();
     448                 :           1 : }
     449                 :             : } // namespace selftest
     450                 :             : 
     451                 :             : #endif /* !CHECKING_P */
     452                 :             : 
     453                 :             : // Expands all LANG_HOOKS_x of GCC
     454                 :             : struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
     455                 :             : 
     456                 :             : // These are for GCC's garbage collector to work properly or something
     457                 :             : #include "gt-rust-rust-lang.h"
     458                 :             : #include "gtype-rust.h"
        

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.