* gdbtypes.c (lookup_primitive_typename): Delete function.
* gdbtypes.h (lookup_primitive_typename): Delete declaration.
* ada-lex.l: Use language_lookup_primitive_type_by_name.
* gdbtypes.c (lookup_typename): Ditto.
* f-exp.y (yylex): Ditto.
* c-exp.y (yylex): Ditto, eliminate assignment in "if".
2004-07-28 Andrew Cagney <cagney@gnu.org>
+ * gdbtypes.c (lookup_primitive_typename): Delete function.
+ * gdbtypes.h (lookup_primitive_typename): Delete declaration.
+ * ada-lex.l: Use language_lookup_primitive_type_by_name.
+ * gdbtypes.c (lookup_typename): Ditto.
+ * f-exp.y (yylex): Ditto.
+ * c-exp.y (yylex): Ditto, eliminate assignment in "if".
+
* scm-lang.c (c_builtin_types): Delete extern declaration.
(scm_language_defn): Replace
string_char_type and primitive_type_vector with
if (segments == 0)
{
- type = lookup_primitive_typename (name);
+ type = language_lookup_primitive_type_by_name (current_language,
+ current_gdbarch,
+ name);
if (type == NULL && strcmp ("system__address", name) == 0)
type = builtin_type_ada_system_address;
if (type != NULL)
yylval.tsym.type = SYMBOL_TYPE (sym);
return TYPENAME;
}
- if ((yylval.tsym.type = lookup_primitive_typename (tmp)) != 0)
+ yylval.tsym.type
+ = language_lookup_primitive_type_by_name (current_language,
+ current_gdbarch, tmp);
+ if (yylval.tsym.type != NULL)
return TYPENAME;
/* Input names that aren't symbols but ARE valid hex numbers,
yylval.tsym.type = SYMBOL_TYPE (sym);
return TYPENAME;
}
- if ((yylval.tsym.type = lookup_primitive_typename (tmp)) != 0)
+ yylval.tsym.type
+ = language_lookup_primitive_type_by_name (current_language,
+ current_gdbarch, tmp);
+ if (yylval.tsym.type != NULL)
return TYPENAME;
/* Input names that aren't symbols but ARE valid hex numbers,
return TYPE_NAME (type);
}
-/* Lookup a primitive type named NAME.
- Return zero if NAME is not a primitive type. */
-
-struct type *
-lookup_primitive_typename (char *name)
-{
- return language_lookup_primitive_type_by_name (current_language,
- current_gdbarch,
- name);
-}
-
/* Lookup a typedef or primitive type named NAME,
visible in lexical block BLOCK.
If NOERR is nonzero, return zero if NAME is not suitably defined. */
sym = lookup_symbol (name, block, VAR_DOMAIN, 0, (struct symtab **) NULL);
if (sym == NULL || SYMBOL_CLASS (sym) != LOC_TYPEDEF)
{
- tmp = lookup_primitive_typename (name);
+ tmp = language_lookup_primitive_type_by_name (current_language,
+ current_gdbarch,
+ name);
if (tmp)
{
return (tmp);
extern void check_stub_method_group (struct type *, int);
-extern struct type *lookup_primitive_typename (char *);
-
extern char *gdb_mangle_name (struct type *, int, int);
extern struct type *lookup_typename (char *, struct block *, int);
#endif /* not 0 */
return TYPENAME;
}
- if ((yylval.tsym.type = lookup_primitive_typename (tmp)) != 0)
- return TYPENAME;
+ yylval.tsym.type
+ = language_lookup_primitive_type_by_name (current_language,
+ current_gdbarch, tmp);
+ if (yylval.tsym.type != NULL)
+ return TYPENAME;
/* See if it's an ObjC classname. */
if (!sym)
#endif /* not 0 */
return TYPENAME;
}
- if ((yylval.tsym.type = lookup_primitive_typename (tmp)) != 0)
- return TYPENAME;
+ yylval.tsym.type
+ = language_lookup_primitive_type_by_name (current_language,
+ current_gdbarch, tmp);
+ if (yylval.tsym.type != NULL)
+ return TYPENAME;
/* Input names that aren't symbols but ARE valid hex numbers,
when the input radix permits them, can be names or numbers