00001 /* 00002 * Copyright 2003, 2004, 2005, 2006 PathScale, Inc. All Rights Reserved. 00003 * 00004 * This program is free software; you can redistribute it and/or modify it 00005 * under the terms of version 2 of the GNU General Public License as 00006 * published by the Free Software Foundation. 00007 * 00008 * This program is distributed in the hope that it would be useful, but 00009 * WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00011 * 00012 * Further, this software is distributed without any warranty that it is 00013 * free of the rightful claim of any third person regarding infringement 00014 * or the like. Any license provided herein, whether implied or 00015 * otherwise, applies only to this software file. Patent licenses, if 00016 * any, provided herein do not apply to combinations of this program with 00017 * other software, or any other product whatsoever. 00018 * 00019 * You should have received a copy of the GNU General Public License along 00020 * with this program; if not, write the Free Software Foundation, Inc., 59 00021 * Temple Place - Suite 330, Boston MA 02111-1307, USA. 00022 * 00023 * File modified June 20, 2003 by PathScale, Inc. to update Open64 C/C++ 00024 * front-ends to GNU 3.2.2 release. 00025 */ 00026 00027 /* generate symtab references for compiler-generated runtime calls */ 00028 00029 #include "defs.h" 00030 #include "errors.h" 00031 #include "symtab.h" 00032 #include "strtab.h" 00033 00034 ST_IDX Throw_Runtime_st_idx() 00035 { 00036 static ST_IDX result = ST_IDX_ZERO; 00037 00038 if (result != ST_IDX_ZERO) 00039 return result; 00040 00041 TY_IDX func_ty_idx = Make_Function_Type(MTYPE_To_TY(MTYPE_V)); 00042 PU_IDX pu_idx; 00043 PU& pu = New_PU(pu_idx); 00044 PU_Init(pu, func_ty_idx, GLOBAL_SYMTAB + 1); 00045 Set_PU_cxx_lang(pu); 00046 ST * st = New_ST(GLOBAL_SYMTAB); 00047 ST_Init(st, Save_Str("__throw"), CLASS_FUNC, SCLASS_EXTERN, 00048 EXPORT_PREEMPTIBLE, TY_IDX(pu_idx)); 00049 return ST_st_idx(st); 00050 } 00051 00052 00053 00054 00055 00056
1.5.6