PIPS
local-ri-util.c
Go to the documentation of this file.
1 /*
2 
3  $Id: local-ri-util.c 23065 2016-03-02 09:05:50Z coelho $
4 
5  Copyright 1989-2016 MINES ParisTech
6 
7  This file is part of PIPS.
8 
9  PIPS is free software: you can redistribute it and/or modify it
10  under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  any later version.
13 
14  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
15  WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  FITNESS FOR A PARTICULAR PURPOSE.
17 
18  See the GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
22 
23 */
24 #ifdef HAVE_CONFIG_H
25  #include "pips_config.h"
26 #endif
27 
28 #include "defines-local.h"
29 
31 type t;
32 {
33  if(type_variable_p(t))
34  {
35  variable v = type_variable(t);
36 
39  }
40  else
41  return t; /* !!! means sharing */
42 }
43 
44 /* library functions...
45  */
46 static string fortran_library[] =
47 {
48  "TIME",
49  (string) NULL
50 } ;
51 
53 entity e;
54 {
55  string *s; const char* name=entity_local_name(e);
56 
57  if (!top_level_entity_p(e)) return(false);
58  for (s=fortran_library; *s!=(string) NULL; s++)
59  if (same_string_p(*s, name)) return true;
60 
61  return false; /* else not found */
62 }
63 
64 /* that is all
65  */
type type_variable_dup(type t)
local-ri-util.c
Definition: local-ri-util.c:30
static string fortran_library[]
library functions...
Definition: local-ri-util.c:46
bool fortran_library_entity_p(entity e)
Definition: local-ri-util.c:52
#define same_string_p(s1, s2)
char * string
STRING.
Definition: newgen_types.h:39
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
Definition: entity.c:453
bool top_level_entity_p(entity e)
Check if the scope of entity e is global.
Definition: entity.c:1130
list ldimensions_dup(list)
Definition: type.c:1166
type MakeTypeVariable(basic, cons *)
BEGIN_EOLE.
Definition: type.c:116
#define type_variable(x)
Definition: ri.h:2949
#define variable_dimensions(x)
Definition: ri.h:3122
#define type_variable_p(x)
Definition: ri.h:2947
#define variable_basic(x)
Definition: ri.h:3120