From 1d6286ed048eb1997a0afea0f18cb9eb1789f386 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 14 Sep 2020 11:08:01 -0400 Subject: gdb: add type::has_varargs / type::set_has_varargs Add the `has_varargs` and `set_has_varargs` methods on `struct type`, in order to remove the `TYPE_VARARGS` macro. In this patch, the macro is changed to use the getter, so all the call sites of the macro that are used as a setter are changed to use the setter method directly. The next patch will remove the macro completely. gdb/ChangeLog: * gdbtypes.h (struct type) : New methods. (TYPE_VARARGS): Use type::has_varargs, change all write call sites to use type::set_has_varargs. Change-Id: I898a1093ae40808b37a7c6fced7f6fa2aae604de --- gdb/eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/eval.c') diff --git a/gdb/eval.c b/gdb/eval.c index 7f9515b..d87b8da 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -665,7 +665,7 @@ fake_method::fake_method (type_instance_flags flags, if (param_types[num_types - 1] == NULL) { --num_types; - TYPE_VARARGS (type) = 1; + type->set_has_varargs (true); } else if (check_typedef (param_types[num_types - 1])->code () == TYPE_CODE_VOID) -- cgit v1.1