OpenADFortTk (including Open64 and OpenAnalysis references)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
glob.h
Go to the documentation of this file.
1 /*
2 
3  Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved.
4 
5  This program is free software; you can redistribute it and/or modify it
6  under the terms of version 2 of the GNU General Public License as
7  published by the Free Software Foundation.
8 
9  This program is distributed in the hope that it would be useful, but
10  WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 
13  Further, this software is distributed without any warranty that it is
14  free of the rightful claim of any third person regarding infringement
15  or the like. Any license provided herein, whether implied or
16  otherwise, applies only to this software file. Patent licenses, if
17  any, provided herein do not apply to combinations of this program with
18  other software, or any other product whatsoever.
19 
20  You should have received a copy of the GNU General Public License along
21  with this program; if not, write the Free Software Foundation, Inc., 59
22  Temple Place - Suite 330, Boston MA 02111-1307, USA.
23 
24  Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky,
25  Mountain View, CA 94043, or:
26 
27  http://www.sgi.com
28 
29  For further information regarding this notice, see:
30 
31  http://oss.sgi.com/projects/GenInfo/NoticeExplan
32 
33 */
34 
35 
36 #ifndef glob_INCLUDED
37 #define glob_INCLUDED
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 /* ====================================================================
43  * ====================================================================
44  *
45  *
46  * Revision history:
47  * 15-Sep-89 - Original Version
48  * 14-Mar-91 - Copied for TP/Muse
49  *
50  * Description:
51  *
52  * External interface to routines in the main Muse/TP compiler driver
53  * module, basically very general purpose control and trace routines
54  * which don't belong anywhere else.
55  *
56  * Also, external interface to global compiler data which doesn't
57  * belong anywhere else. See com/config.h for a general discussion
58  * of where global configuration and option data declarations are
59  * placed.
60  *
61  * All of this data is currently located in the process driver,
62  * bedriver.c for the back end.
63  *
64  * NOTE: This file is intended ultimately to be included in multiple
65  * compiler processes. We therefore attempt to distinguish between
66  * items which are not process-specific and those which are, placing
67  * the latter under the appropriate #ifdefs.
68  *
69  * ====================================================================
70  * ====================================================================
71  */
72 
73 /* Dummy struct definitions to keep prototypes happy: */
74 struct bb;
75 struct symtab;
76 
77 #ifdef __cplusplus
78 struct ST;
79 #else
80 struct st;
81 #endif
82 
83 /* ====================================================================
84  *
85  * Non-process-specific data (intended for both front ends and back
86  * end).
87  *
88  * ====================================================================
89  */
90 
91 extern char *Cur_PU_Name; /* The current program unit name */
92 extern char *Orig_PU_Name; /* The original program unit name in source */
93 
94 /* Kind of the current program unit -- set similarly to Cur_PU_Name */
95 typedef enum {
101  PU_MAX_KIND /* used for bounds checking */
102 } PU_KIND;
103 extern PU_KIND Cur_PU_Kind;
104 
105 /* Current file names: */
106 extern char *Src_File_Name; /* Source file */
107 extern char *Orig_Src_File_Name; /* Original source file passed to driver */
108 extern char *Cpp_File_Name; /* cpp-preprocessed file */
109 extern char *Lst_File_Name; /* Listing file */
110 extern char *Err_File_Name; /* Error file */
111 extern char *Trc_File_Name; /* Trace file */
112 extern char *Tlog_File_Name; /* Transformation log file */
113 extern char *Irb_File_Name; /* ACIR intermediate file */
114 extern char *IR_File_Name; /* SGIR intermediate file */
115 extern char *Ipa_File_Name; /* IPA file */
116 extern char *Asm_File_Name; /* Assembly file */
117 extern char *Obj_File_Name; /* Relocatable object file */
118 extern char *Feedback_File_Name;/* feedback file produced from prof */
119 #ifndef MONGOOSE_BE
120 extern char *Lib_File_Name; /* Program library file */
121 #endif
122 extern char *Lib_Lock_Name; /* Program library lock file */
123 extern char *DSTdump_File_Name; /* Dwarf intermediate (i.e. DST) dump file */
124 extern char *Global_File_Name; /* Global symbol table file */
125 
126 /* Current file handles if open, NULL otherwise: */
127 extern FILE *Src_File; /* Source file */
128 extern FILE *Cpp_File; /* cpp-preprocessed file */
129 extern FILE *Lst_File; /* Listing file */
130 extern FILE *Err_File; /* Error file */
131 extern FILE *Trc_File; /* Trace file */
132 extern FILE *Tlog_File; /* Transformation log file */
133 extern FILE *Irb_File; /* ACIR intermediate file */
134 extern FILE *IR_File; /* SGIR intermediate file */
135 extern FILE *Ipa_File; /* IPA file */
136 extern FILE *Asm_File; /* Assembly file */
137 extern FILE *Obj_File; /* Relocatable object file */
138 extern FILE *Lib_File; /* Program library file */
139 extern FILE *Tim_File; /* Timing info file (usually trace) */
140 #ifdef MONGOOSE_BE
141 #define MMAPPED_FILE (1) /* some components use mmap instead of
142  stream i/o, in those cases the *_File
143  will be set to MMAPPED_FILE to show that
144  the file is active */
145 #endif /* MONGOOSE_BE */
146 
147 extern INT32 Num_Source_Files;
148 
149 /* Output requested: */
150 extern BOOL Assembly; /* Assembly code */
151 extern BOOL Object_Code; /* Object code */
152 extern BOOL Symbol_Table_Out; /* Symbol table output (list or trace) */
153 extern BOOL Show_Progress; /* Report progress to stdout */
154 
155 /* Clean up files after failure: */
156 extern void Cleanup_Files (
157  BOOL report /* Report errors which occur during file cleanup? */
158  /* This should generally be FALSE for failures. */
159  ,BOOL delete_doto /*delete the .o if created */
160 );
161 
162 /* Clean up and terminate program with given exit status: */
163 extern void Terminate ( INT status );
164 
165 /* ====================================================================
166  *
167  * Back end process-specific data.
168  *
169  * ====================================================================
170  */
171 
172 #ifdef BACK_END
173 
174 /* Front End process info: for consistency checking */
175 /*
176  * The first two are set in the front end, and examined in the back end.
177  * They are also put out to the ipa file. The third is only used in the
178  * back end to store the Version number of the front end. (In the front
179  * end, this information is stored in "Version". In the back end,
180  * "Version" contains the version number of the *back* end. Those
181  * variables are initialized in <machine>/<process>/version.c
182  */
183 extern INT32 Fe_Process_Id;
184 extern INT32 Fe_Process_Time;
185 extern char *Fe_Version;
186 extern BOOL Fe_Josie; /* Did .B come from a Josie front end? */
187 
188 /* Set FE process info -- defined in flags.c: */
189 extern void Set_Fe_Info ( INT32 pid, INT32 ptime, char *fe_version );
190 
191 /* Set source file name: */
192 extern void Set_File_Name ( char *name );
193 
194 /* Have the OP_REGCOPY operations been translated? */
196 
197 #else /* ! BACK_END */
198 
199 /* Our front ends are never Josie front ends: */
200 # define Fe_Josie FALSE
201 
202 #endif /* BACK_END */
203 
204 #ifdef __cplusplus
205 }
206 #endif
207 
208 extern BOOL Compile_Upc;
209 
210 #endif /* glob_INCLUDED */