1 /* Copyright (C) 2009. Free Software Foundation, Inc.
2 Contributed by Xinliang David Li (davidxl@google.com) and
3 Raksit Ashok (raksit@google.com)
5 This file is part of GCC.
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
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
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/>. */
24 /* Used in profile-gen */
25 extern unsigned ggc_total_memory
; /* in KB */
27 /* Primary module's id (non-zero). If no module-info was read in, this will
29 extern unsigned primary_module_id
;
31 /* The macro to test if the compilation is in light weight IPO mode.
32 In this mode, the source module being compiled will be compiled
33 together with 0 or more auxiliary modules. */
34 #define L_IPO_COMP_MODE (primary_module_id != 0)
36 /* The macro to test if the current module being parsed is the
37 primary source module. */
38 #define L_IPO_IS_PRIMARY_MODULE (current_module_id == primary_module_id)
40 /* The macro to test if the current module being parsed is an
41 auxiliary source module. */
42 #define L_IPO_IS_AUXILIARY_MODULE (L_IPO_COMP_MODE && current_module_id \
43 && current_module_id != primary_module_id)
45 /* Current module id. */
46 extern unsigned current_module_id
;
47 extern unsigned include_all_aux
;
48 extern struct gcov_module_info
**module_infos
;
49 extern int is_last_module (unsigned mod_id
);
51 extern unsigned num_in_fnames
;
53 extern bool parser_parsing_start
;
55 void push_module_scope (void);
56 void pop_module_scope (void);
57 tree
lipo_save_decl (tree src
);
58 void lipo_restore_decl (tree
, tree
);
59 void add_decl_to_current_module_scope (tree decl
, void *b
);
60 int lipo_cmp_type (tree t1
, tree t2
);
61 tree
get_type_or_decl_name (tree
);
62 int equivalent_struct_types_for_tbaa (const_tree t1
, const_tree t2
);
63 void lipo_link_and_fixup (void);
64 extern void copy_defined_module_set (tree
, tree
);
65 extern bool is_parsing_done_p (void);
66 extern const char* get_module_name (unsigned int);