Home | History | Annotate | Download | only in include
      1 /* Copyright (C) 2009. Free Software Foundation, Inc.
      2    Contributed by Xinliang David Li (davidxl (at) google.com) and
      3                   Raksit Ashok  (raksit (at) google.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 #ifndef GCC_L_IPO_H
     22 #define GCC_L_IPO_H
     23 
     24 /* Primary module's id (non-zero). If no module-info was read in, this will
     25    be zero.  */
     26 extern unsigned primary_module_id;
     27 
     28 /* The macro to test if the compilation is in light weight IPO mode.
     29    In this mode, the source module being compiled will be compiled
     30    together with 0 or more auxiliary modules.  */
     31 #define L_IPO_COMP_MODE (primary_module_id != 0)
     32 
     33 /* The macro to test if the current module being parsed is the
     34    primary source module.  */
     35 #define L_IPO_IS_PRIMARY_MODULE (current_module_id == primary_module_id)
     36 
     37 /* The macro to test if the current module being parsed is an
     38    auxiliary source module.  */
     39 #define L_IPO_IS_AUXILIARY_MODULE (L_IPO_COMP_MODE && current_module_id \
     40                              && current_module_id != primary_module_id)
     41 
     42 /* Current module id.  */
     43 extern unsigned current_module_id;
     44 extern struct gcov_module_info **module_infos;
     45 extern bool is_last_module (unsigned mod_id);
     46 
     47 extern unsigned num_in_fnames;
     48 extern int at_eof;
     49 extern bool parser_parsing_start;
     50 
     51 void push_module_scope (void);
     52 void pop_module_scope (void);
     53 tree lipo_save_decl (tree src);
     54 void lipo_restore_decl (tree, tree);
     55 void add_decl_to_current_module_scope (tree decl, void *b);
     56 int lipo_cmp_type (tree t1, tree t2);
     57 tree get_type_or_decl_name (tree);
     58 
     59 #endif
     60