aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-exp.y
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2019-12-05 13:44:30 -0500
committerSimon Marchi <simon.marchi@efficios.com>2019-12-05 13:44:30 -0500
commitb858499daf0a824a518bac8bc13495ad856ab10d (patch)
tree18d112d989c93d8598786c13d7a19a8b9a624240 /gdb/c-exp.y
parenta23e9ba17f6ab8bef1f2cc02686e8567bdc728ca (diff)
downloadgdb-b858499daf0a824a518bac8bc13495ad856ab10d.zip
gdb-b858499daf0a824a518bac8bc13495ad856ab10d.tar.gz
gdb-b858499daf0a824a518bac8bc13495ad856ab10d.tar.bz2
Remove gdbarch parameter of lookup_typename
I noticed that the gdbarch parameter of lookup_typename was unused, so I removed it (as well as from lookup_signed_typename and lookup_unsigned_typename) and updated all callers. Tested by rebuilding. gdb/ChangeLog: * c-exp.y: Update calls to lookup_typename, lookup_signed_typename and lookup_unsigned_typename. * c-lang.c (evaluate_subexp_c): Likewise. * cp-namespace.c (cp_lookup_symbol_imports_or_template): Likewise. * eval.c (binop_promote): Likewise. * gdbtypes.c (lookup_typename): Remove gdbarch parameter. (lookup_unsigned_typename): Likewise. (lookup_signed_typename): Likewise. * gdbtypes.h (lookup_unsigned_typename): Likewise. (lookup_signed_typename): Likewise. (lookup_typename): Likewise. * guile/scm-type.c (tyscm_lookup_typename): Update calls to lookup_typename, lookup_signed_typename, lookup_unsigned_typename. * m2-exp.y: Likewise. * printcmd.c (printf_wide_c_string): Likewise. (ui_printf): Likewise. * python/py-type.c (typy_lookup_typename): Likewise. * python/py-xmethods.c (python_xmethod_worker::invoke): Likewise. * rust-exp.y: Likewise.
Diffstat (limited to 'gdb/c-exp.y')
-rw-r--r--gdb/c-exp.y36
1 files changed, 0 insertions, 36 deletions
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 0ec6b19..fb806a8 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -824,7 +824,6 @@ exp : SIZEOF '(' type ')' %prec UNARY
write_exp_elt_opcode (pstate, OP_LONG);
write_exp_elt_type (pstate, lookup_signed_typename
(pstate->language (),
- pstate->gdbarch (),
"int"));
type = check_typedef (type);
@@ -1301,117 +1300,89 @@ typebase
{ $$ = $1.type; }
| INT_KEYWORD
{ $$ = lookup_signed_typename (pstate->language (),
- pstate->gdbarch (),
"int"); }
| LONG
{ $$ = lookup_signed_typename (pstate->language (),
- pstate->gdbarch (),
"long"); }
| SHORT
{ $$ = lookup_signed_typename (pstate->language (),
- pstate->gdbarch (),
"short"); }
| LONG INT_KEYWORD
{ $$ = lookup_signed_typename (pstate->language (),
- pstate->gdbarch (),
"long"); }
| LONG SIGNED_KEYWORD INT_KEYWORD
{ $$ = lookup_signed_typename (pstate->language (),
- pstate->gdbarch (),
"long"); }
| LONG SIGNED_KEYWORD
{ $$ = lookup_signed_typename (pstate->language (),
- pstate->gdbarch (),
"long"); }
| SIGNED_KEYWORD LONG INT_KEYWORD
{ $$ = lookup_signed_typename (pstate->language (),
- pstate->gdbarch (),
"long"); }
| UNSIGNED LONG INT_KEYWORD
{ $$ = lookup_unsigned_typename (pstate->language (),
- pstate->gdbarch (),
"long"); }
| LONG UNSIGNED INT_KEYWORD
{ $$ = lookup_unsigned_typename (pstate->language (),
- pstate->gdbarch (),
"long"); }
| LONG UNSIGNED
{ $$ = lookup_unsigned_typename (pstate->language (),
- pstate->gdbarch (),
"long"); }
| LONG LONG
{ $$ = lookup_signed_typename (pstate->language (),
- pstate->gdbarch (),
"long long"); }
| LONG LONG INT_KEYWORD
{ $$ = lookup_signed_typename (pstate->language (),
- pstate->gdbarch (),
"long long"); }
| LONG LONG SIGNED_KEYWORD INT_KEYWORD
{ $$ = lookup_signed_typename (pstate->language (),
- pstate->gdbarch (),
"long long"); }
| LONG LONG SIGNED_KEYWORD
{ $$ = lookup_signed_typename (pstate->language (),
- pstate->gdbarch (),
"long long"); }
| SIGNED_KEYWORD LONG LONG
{ $$ = lookup_signed_typename (pstate->language (),
- pstate->gdbarch (),
"long long"); }
| SIGNED_KEYWORD LONG LONG INT_KEYWORD
{ $$ = lookup_signed_typename (pstate->language (),
- pstate->gdbarch (),
"long long"); }
| UNSIGNED LONG LONG
{ $$ = lookup_unsigned_typename (pstate->language (),
- pstate->gdbarch (),
"long long"); }
| UNSIGNED LONG LONG INT_KEYWORD
{ $$ = lookup_unsigned_typename (pstate->language (),
- pstate->gdbarch (),
"long long"); }
| LONG LONG UNSIGNED
{ $$ = lookup_unsigned_typename (pstate->language (),
- pstate->gdbarch (),
"long long"); }
| LONG LONG UNSIGNED INT_KEYWORD
{ $$ = lookup_unsigned_typename (pstate->language (),
- pstate->gdbarch (),
"long long"); }
| SHORT INT_KEYWORD
{ $$ = lookup_signed_typename (pstate->language (),
- pstate->gdbarch (),
"short"); }
| SHORT SIGNED_KEYWORD INT_KEYWORD
{ $$ = lookup_signed_typename (pstate->language (),
- pstate->gdbarch (),
"short"); }
| SHORT SIGNED_KEYWORD
{ $$ = lookup_signed_typename (pstate->language (),
- pstate->gdbarch (),
"short"); }
| UNSIGNED SHORT INT_KEYWORD
{ $$ = lookup_unsigned_typename (pstate->language (),
- pstate->gdbarch (),
"short"); }
| SHORT UNSIGNED
{ $$ = lookup_unsigned_typename (pstate->language (),
- pstate->gdbarch (),
"short"); }
| SHORT UNSIGNED INT_KEYWORD
{ $$ = lookup_unsigned_typename (pstate->language (),
- pstate->gdbarch (),
"short"); }
| DOUBLE_KEYWORD
{ $$ = lookup_typename (pstate->language (),
- pstate->gdbarch (),
"double",
NULL,
0); }
| LONG DOUBLE_KEYWORD
{ $$ = lookup_typename (pstate->language (),
- pstate->gdbarch (),
"long double",
NULL,
0); }
@@ -1483,19 +1454,15 @@ typebase
}
| UNSIGNED type_name
{ $$ = lookup_unsigned_typename (pstate->language (),
- pstate->gdbarch (),
TYPE_NAME($2.type)); }
| UNSIGNED
{ $$ = lookup_unsigned_typename (pstate->language (),
- pstate->gdbarch (),
"int"); }
| SIGNED_KEYWORD type_name
{ $$ = lookup_signed_typename (pstate->language (),
- pstate->gdbarch (),
TYPE_NAME($2.type)); }
| SIGNED_KEYWORD
{ $$ = lookup_signed_typename (pstate->language (),
- pstate->gdbarch (),
"int"); }
/* It appears that this rule for templates is never
reduced; template recognition happens by lookahead
@@ -1517,7 +1484,6 @@ type_name: TYPENAME
$$.stoken.ptr = "int";
$$.stoken.length = 3;
$$.type = lookup_signed_typename (pstate->language (),
- pstate->gdbarch (),
"int");
}
| LONG
@@ -1525,7 +1491,6 @@ type_name: TYPENAME
$$.stoken.ptr = "long";
$$.stoken.length = 4;
$$.type = lookup_signed_typename (pstate->language (),
- pstate->gdbarch (),
"long");
}
| SHORT
@@ -1533,7 +1498,6 @@ type_name: TYPENAME
$$.stoken.ptr = "short";
$$.stoken.length = 5;
$$.type = lookup_signed_typename (pstate->language (),
- pstate->gdbarch (),
"short");
}
;