diff options
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -3385,6 +3385,23 @@ struct GTY(()) tree_function_decl { /* 3 bits left */ }; +/* The source language of the translation-unit. */ +#define TRANSLATION_UNIT_LANGUAGE(NODE) \ + (TRANSLATION_UNIT_DECL_CHECK (NODE)->translation_unit_decl.language) + +/* TRANSLATION_UNIT_DECL inherits from DECL_MINIMAL. */ + +struct GTY(()) tree_translation_unit_decl { + struct tree_decl_common common; + /* Source language of this translation unit. Used for DWARF output. */ + const char * GTY((skip(""))) language; + /* TODO: Non-optimization used to build this translation unit. */ + /* TODO: Root of a partial DWARF tree for global types and decls. */ +}; + +/* A vector of all translation-units. */ +extern GTY (()) VEC(tree,gc) *all_translation_units; + /* For a TYPE_DECL, holds the "original" type. (TREE_TYPE has the copy.) */ #define DECL_ORIGINAL_TYPE(NODE) \ (TYPE_DECL_CHECK (NODE)->decl_non_common.result) @@ -3490,6 +3507,8 @@ union GTY ((ptr_alias (union lang_tree_node), struct tree_const_decl GTY ((tag ("TS_CONST_DECL"))) const_decl; struct tree_type_decl GTY ((tag ("TS_TYPE_DECL"))) type_decl; struct tree_function_decl GTY ((tag ("TS_FUNCTION_DECL"))) function_decl; + struct tree_translation_unit_decl GTY ((tag ("TS_TRANSLATION_UNIT_DECL"))) + translation_unit_decl; struct tree_type GTY ((tag ("TS_TYPE"))) type; struct tree_list GTY ((tag ("TS_LIST"))) list; struct tree_vec GTY ((tag ("TS_VEC"))) vec; @@ -4048,6 +4067,7 @@ extern tree build_decl_stat (location_t, enum tree_code, tree, tree MEM_STAT_DECL); extern tree build_fn_decl (const char *, tree); #define build_decl(l,c,t,q) build_decl_stat (l,c,t,q MEM_STAT_INFO) +extern tree build_translation_unit_decl (tree); extern tree build_block (tree, tree, tree, tree); extern tree build_empty_stmt (location_t); extern tree build_omp_clause (location_t, enum omp_clause_code); |