Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
glob.cxx
Go to the documentation of this file.
00001 /*
00002 
00003   Copyright (C) 2000, 2001 Silicon Graphics, Inc.  All Rights Reserved.
00004 
00005   This program is free software; you can redistribute it and/or modify it
00006   under the terms of version 2 of the GNU General Public License as
00007   published by the Free Software Foundation.
00008 
00009   This program is distributed in the hope that it would be useful, but
00010   WITHOUT ANY WARRANTY; without even the implied warranty of
00011   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
00012 
00013   Further, this software is distributed without any warranty that it is
00014   free of the rightful claim of any third person regarding infringement 
00015   or the like.  Any license provided herein, whether implied or 
00016   otherwise, applies only to this software file.  Patent licenses, if 
00017   any, provided herein do not apply to combinations of this program with 
00018   other software, or any other product whatsoever.  
00019 
00020   You should have received a copy of the GNU General Public License along
00021   with this program; if not, write the Free Software Foundation, Inc., 59
00022   Temple Place - Suite 330, Boston MA 02111-1307, USA.
00023 
00024   Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
00025   Mountain View, CA 94043, or:
00026 
00027   http://www.sgi.com
00028 
00029   For further information regarding this notice, see:
00030 
00031   http://oss.sgi.com/projects/GenInfo/NoticeExplan
00032 
00033 */
00034 
00035 
00036 /* ====================================================================
00037  * ====================================================================
00038  *
00039  *
00040  * Revision history:
00041  *  15-Sep-93 - Original Version
00042  *
00043  * Description:
00044  *
00045  * This file contains miscellaneous global data and utility functions
00046  * for the compiler which used to be part of each pass driver.
00047  *
00048  * ====================================================================
00049  * ====================================================================
00050  */
00051 
00052 #ifdef USE_PCH
00053 #include "common_com_pch.h"
00054 #endif /* USE_PCH */
00055 #pragma hdrstop
00056 #include "defs.h"
00057 #include "errors.h"
00058 #include "glob.h"
00059 #include "tracing.h"
00060 
00061 #include "mempool.h"
00062 #if !(defined(SGI_FRONT_END_CPP) && !defined(FFE))
00063 #include "wn.h"
00064 #endif /* if !(defined(SGI_FRONT_END_CPP) && !defined(FFE)) */
00065 #include "stab.h"
00066 #include "const.h"
00067 #include "irbdata.h"
00068 
00069 /* The current program unit name -- */
00070 char *Cur_PU_Name = NULL;
00071 char *Orig_PU_Name = NULL;
00072 
00073 /* Type of the current program unit -- set similarly to Cur_PU_Name */
00074 PU_KIND Cur_PU_Kind = PU_UNKNOWN;
00075 
00076 BOOL Symbol_Table_Out = FALSE;  /* Symbol table output (list or trace) */
00077 BOOL Show_Progress = FALSE;     /* Report progress to stdout */
00078 
00079 BOOL Compile_Upc = FALSE;
00080 
00081 /* ====================================================================
00082  *
00083  * Front End process info: for consistency checking 
00084  *
00085  * The first two are set in the front end, and examined in the back end.
00086  * They are also put out to the ipa file.  The third is only used in the
00087  * back end to store the Version number of the front end.  (In the front
00088  * end, this information is stored in "Version".  In the back end,
00089  * "Version" contains the version number of the *back* end.  Those
00090  * variables are initialized in <machine>/<process>/version.c
00091  *
00092  * ====================================================================
00093  */
00094 
00095 INT32 Fe_Process_Id = -1;
00096 INT32 Fe_Process_Time = -1;
00097 char *Fe_Version = NULL;
00098 
00099 /* ====================================================================
00100  *
00101  * File names and handles.
00102  *
00103  * ====================================================================
00104  */
00105 
00106 /* Current file names: */
00107 char *Src_File_Name = NULL;     /* Source file */
00108 char *Orig_Src_File_Name = NULL; /* Original source file */
00109 char *Cpp_File_Name = NULL;     /* cpp-preprocessed file */
00110 char *Err_File_Name = NULL;     /* Error file */
00111 char *Lst_File_Name = NULL;     /* Listing file */
00112 char *Trc_File_Name = NULL;     /* Trace file */
00113 char *Tlog_File_Name = NULL;    /* Transformation log file */
00114 char *IR_File_Name  = NULL;     /* SGIR file */
00115 char *Irb_File_Name = NULL;     /* ACIR intermediate file */
00116 char *Asm_File_Name = NULL;     /* Assembly file */
00117 char *Obj_File_Name = NULL;     /* Relocatable object file */
00118 char *Feedback_File_Name = NULL; /* Feedback file */
00119 #ifndef MONGOOSE_BE
00120 char *Lib_File_Name = NULL;     /* Program library file */
00121 #endif 
00122 char *Lib_Lock_Name = NULL;     /* Program library lock file */
00123 char *DSTdump_File_Name = NULL; /* Dwarf (i.e. DST) dump file */
00124 char *Global_File_Name = NULL;  /* Global symbol table file */
00125 
00126 /* Current file handles if open, NULL otherwise: */
00127 FILE *Src_File = NULL;          /* Source file */
00128 FILE *Cpp_File = NULL;          /* cpp-preprocessed file */
00129 FILE *Err_File = NULL;          /* Error file */
00130 FILE *Lst_File = NULL;          /* Listing file */
00131 FILE *Trc_File = NULL;          /* Trace file */
00132 FILE *Tlog_File = NULL;         /* Transformation log file */
00133 FILE *IR_File  = NULL;          /* SGIR file */
00134 FILE *Irb_File = NULL;          /* ACIR intermediate file */
00135 FILE *Asm_File = NULL;          /* Assembly file */
00136 FILE *Obj_File = NULL;          /* Relocatable object file */
00137 FILE *Lib_File = NULL;          /* Program library file */
00138 FILE *Tim_File = NULL;          /* Timer report file, usually TFile */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines