Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
init.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 // This file contains only Linux-specific code and should be entirely
00037 // #ifdef'd out for Irix.
00038 
00039 // Work around the "undefined weak symbol" bug in Linux.
00040 //
00041 // see comments in be/com/weak.cxx.
00042 //
00043 // This file define initialization of pointer variables to symbols defined
00044 // in lno.so but referenced in be/be.so.
00045 
00046 #if defined(__linux__) || defined(_GCC_NO_PRAGMAWEAK) || defined(__CYGWIN__)
00047 
00048 #include "defs.h"
00049 #include "wn.h"
00050 #include "pu_info.h"
00051 #include "w2c_driver.h"
00052 
00053 extern void (*W2C_Cleanup_p)(void);
00054 extern void (*W2C_Fini_p)(void);
00055 extern void (*W2C_Init_p)(void);
00056 extern const char * (*W2C_Object_Name_p)(const ST *func_st);
00057 extern void (*W2C_Mark_Loads_p)(void);
00058 extern void (*W2C_Nomark_Loads_p)(void);
00059 extern void (*W2C_Outfile_Fini_p)(BOOL emit_global_decls);
00060 extern void (*W2C_Outfile_Init_p)(BOOL emit_global_decls);
00061 extern void (*W2C_Outfile_Translate_Pu_p)(WN *pu, BOOL emit_global_decls);
00062 extern void (*W2C_Pop_PU_p)(void);
00063 extern void (*W2C_Process_Command_Line_p)(INT phase_argc, char * const 
00064   phase_argv[], INT argc, char * const argv[]);
00065 extern void (*W2C_Push_PU_p)(const WN *pu, WN *body_part_of_interest);
00066 extern void (*W2C_Set_Prompf_Emission_p)(const WN_MAP *construct_map);
00067 extern void (*W2C_Set_Frequency_Map_p)(WN_MAP frequency_map);
00068 extern const char *(*W2C_Get_Transformed_Src_Path_p)(void);
00069 extern void (*W2C_Reset_Purple_Emission_p)(void);
00070 extern void (*W2C_Set_Purple_Emission_p)(void);
00071 extern BOOL (*W2C_Should_Emit_Nested_PUs_p)(void);
00072 extern void (*W2C_Translate_Global_Defs_p)(FILE *outfile);
00073 extern void (*W2C_Translate_Global_Types_p)(FILE *outfile);
00074 extern void (*W2C_Translate_Istore_Lhs_p)(char *strbuf,
00075   UINT bufsize, const WN* lhs, mINT64 istore_ofst, TY_IDX istore_addr_ty,
00076   TYPE_ID istore_mtype);
00077 extern void (*W2C_Translate_Purple_Main_p)(FILE *outfile, const WN *pu, 
00078   const char *region_name);
00079 extern void (*W2C_Translate_Stid_Lhs_p)(char *strbuf, UINT bufsize,
00080   const ST *stid_st, mINT64 stid_ofst, TY_IDX stid_ty, TYPE_ID stid_mtype);
00081 extern void (*W2C_Translate_Wn_p)(FILE *outfile, const WN *wn);
00082 extern void (*W2C_Translate_Wn_Str_p)(char *strbuf, UINT bufsize, const
00083   WN *wn);
00084 
00085 struct W2C_INIT
00086 {
00087     W2C_INIT () {
00088       W2C_Cleanup_p = W2C_Cleanup;
00089       W2C_Fini_p = W2C_Fini;
00090       W2C_Init_p = W2C_Init;
00091       W2C_Object_Name_p = W2C_Object_Name;
00092       W2C_Mark_Loads_p = W2C_Mark_Loads;
00093       W2C_Nomark_Loads_p = W2C_Nomark_Loads;
00094       W2C_Outfile_Fini_p = W2C_Outfile_Fini;
00095       W2C_Outfile_Init_p = W2C_Outfile_Init;
00096       W2C_Outfile_Translate_Pu_p = W2C_Outfile_Translate_Pu;
00097       W2C_Pop_PU_p = W2C_Pop_PU;
00098       W2C_Process_Command_Line_p = W2C_Process_Command_Line;
00099       W2C_Push_PU_p = W2C_Push_PU;
00100       W2C_Set_Prompf_Emission_p = W2C_Set_Prompf_Emission;
00101       W2C_Set_Frequency_Map_p = W2C_Set_Frequency_Map;
00102       W2C_Get_Transformed_Src_Path_p = W2C_Get_Transformed_Src_Path;
00103       W2C_Reset_Purple_Emission_p = W2C_Reset_Purple_Emission;
00104       W2C_Set_Purple_Emission_p = W2C_Set_Purple_Emission;
00105       W2C_Should_Emit_Nested_PUs_p = W2C_Should_Emit_Nested_PUs;
00106       W2C_Translate_Global_Defs_p = W2C_Translate_Global_Defs;
00107       W2C_Translate_Global_Types_p = W2C_Translate_Global_Types;
00108       W2C_Translate_Istore_Lhs_p = W2C_Translate_Istore_Lhs;
00109       W2C_Translate_Purple_Main_p = W2C_Translate_Purple_Main;
00110       W2C_Translate_Stid_Lhs_p = W2C_Translate_Stid_Lhs;
00111       W2C_Translate_Wn_p = W2C_Translate_Wn;
00112       W2C_Translate_Wn_Str_p = W2C_Translate_Wn_Str;
00113     }
00114 } W2C_Initializer;
00115 
00116 #endif // __linux__
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines