aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-exp.y
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-03-27 13:52:01 -0600
committerTom Tromey <tromey@adacore.com>2023-04-17 10:43:06 -0600
commit8a2ced4fe401a36db6a9d4de5813951009a62a9e (patch)
tree63028cea35ca4f65f7a9addbcf41e36cce9b1f29 /gdb/ada-exp.y
parent64f33c6938af83b3365c118a049fdc444de95b12 (diff)
downloadgdb-8a2ced4fe401a36db6a9d4de5813951009a62a9e.zip
gdb-8a2ced4fe401a36db6a9d4de5813951009a62a9e.tar.gz
gdb-8a2ced4fe401a36db6a9d4de5813951009a62a9e.tar.bz2
Remove some Ada parser helper functions
These helper functions in the Ada parser don't seem all that worthwhile to me, so this patch removes them.
Diffstat (limited to 'gdb/ada-exp.y')
-rw-r--r--gdb/ada-exp.y52
1 files changed, 9 insertions, 43 deletions
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index a9c37be..4095106 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -93,18 +93,8 @@ static const struct block *block_lookup (const struct block *, const char *);
static void write_ambiguous_var (struct parser_state *,
const struct block *, const char *, int);
-static struct type *type_int (struct parser_state *);
-
-static struct type *type_long (struct parser_state *);
-
-static struct type *type_long_long (struct parser_state *);
-
-static struct type *type_long_double (struct parser_state *);
-
static struct type *type_for_char (struct parser_state *, ULONGEST);
-static struct type *type_boolean (struct parser_state *);
-
static struct type *type_system_address (struct parser_state *);
static std::string find_completion_bounds (struct parser_state *);
@@ -934,9 +924,15 @@ primary : STRING
;
primary : TRUEKEYWORD
- { write_int (pstate, 1, type_boolean (pstate)); }
+ {
+ write_int (pstate, 1,
+ parse_type (pstate)->builtin_bool);
+ }
| FALSEKEYWORD
- { write_int (pstate, 0, type_boolean (pstate)); }
+ {
+ write_int (pstate, 0,
+ parse_type (pstate)->builtin_bool);
+ }
;
primary : NEW NAME
@@ -1268,7 +1264,7 @@ write_object_renaming (struct parser_state *par_state,
if (next == renaming_expr)
goto BadEncoding;
renaming_expr = next;
- write_int (par_state, val, type_int (par_state));
+ write_int (par_state, val, parse_type (par_state)->builtin_int);
}
else
{
@@ -1842,30 +1838,6 @@ write_name_assoc (struct parser_state *par_state, struct stoken name)
}
static struct type *
-type_int (struct parser_state *par_state)
-{
- return parse_type (par_state)->builtin_int;
-}
-
-static struct type *
-type_long (struct parser_state *par_state)
-{
- return parse_type (par_state)->builtin_long;
-}
-
-static struct type *
-type_long_long (struct parser_state *par_state)
-{
- return parse_type (par_state)->builtin_long_long;
-}
-
-static struct type *
-type_long_double (struct parser_state *par_state)
-{
- return parse_type (par_state)->builtin_long_double;
-}
-
-static struct type *
type_for_char (struct parser_state *par_state, ULONGEST value)
{
if (value <= 0xff)
@@ -1881,12 +1853,6 @@ type_for_char (struct parser_state *par_state, ULONGEST value)
}
static struct type *
-type_boolean (struct parser_state *par_state)
-{
- return parse_type (par_state)->builtin_bool;
-}
-
-static struct type *
type_system_address (struct parser_state *par_state)
{
struct type *type