gdb/make-target-delegates.py: don't handle "void" in parse_argtypes
Checks
Commit Message
From: Simon Marchi <simon.marchi@efficios.com>
I suppose this was needed when we had `void` in declarations of methods
with no parameters. If so, we no longer need it.
Change-Id: I0a2b398408aa129634e2d73097a038f7f80db4b4
---
gdb/make-target-delegates.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
base-commit: 3f6a060c7543332d0cb4377fc318e2db01ea1d3c
Comments
On 4/16/24 8:52 AM, Simon Marchi wrote:
> From: Simon Marchi <simon.marchi@efficios.com>
>
> I suppose this was needed when we had `void` in declarations of methods
> with no parameters. If so, we no longer need it.
>
> Change-Id: I0a2b398408aa129634e2d73097a038f7f80db4b4
> ---
> gdb/make-target-delegates.py | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gdb/make-target-delegates.py b/gdb/make-target-delegates.py
> index 4d18d2802ced..1893fc63ca84 100755
> --- a/gdb/make-target-delegates.py
> +++ b/gdb/make-target-delegates.py
> @@ -149,8 +149,9 @@ def parse_argtypes(typestr: str):
> typestr = re.sub(r"^\((.*)\)$", r"\1", typestr)
> result: list[str] = []
> for item in re.split(r",\s*", typestr):
> - if item == "void" or item == "":
> + if item == "":
> continue
> +
> m = ARGTYPES.match(item)
> if m:
> if m.group("E"):
>
> base-commit: 3f6a060c7543332d0cb4377fc318e2db01ea1d3c
Seems ok to me. I assume it doesn't result in any differences in the generated
code today?
Approved-By: John Baldwin <jhb@FreeBSD.org>
On 4/16/24 12:06 PM, John Baldwin wrote:
> On 4/16/24 8:52 AM, Simon Marchi wrote:
>> From: Simon Marchi <simon.marchi@efficios.com>
>>
>> I suppose this was needed when we had `void` in declarations of methods
>> with no parameters. If so, we no longer need it.
>>
>> Change-Id: I0a2b398408aa129634e2d73097a038f7f80db4b4
>> ---
>> gdb/make-target-delegates.py | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/gdb/make-target-delegates.py b/gdb/make-target-delegates.py
>> index 4d18d2802ced..1893fc63ca84 100755
>> --- a/gdb/make-target-delegates.py
>> +++ b/gdb/make-target-delegates.py
>> @@ -149,8 +149,9 @@ def parse_argtypes(typestr: str):
>> typestr = re.sub(r"^\((.*)\)$", r"\1", typestr)
>> result: list[str] = []
>> for item in re.split(r",\s*", typestr):
>> - if item == "void" or item == "":
>> + if item == "":
>> continue
>> +
>> m = ARGTYPES.match(item)
>> if m:
>> if m.group("E"):
>>
>> base-commit: 3f6a060c7543332d0cb4377fc318e2db01ea1d3c
>
> Seems ok to me. I assume it doesn't result in any differences in the generated
> code today?
Exactly. I'll add a mention in the commit message.
> Approved-By: John Baldwin <jhb@FreeBSD.org>
Thanks, will push.
Simon
@@ -149,8 +149,9 @@ def parse_argtypes(typestr: str):
typestr = re.sub(r"^\((.*)\)$", r"\1", typestr)
result: list[str] = []
for item in re.split(r",\s*", typestr):
- if item == "void" or item == "":
+ if item == "":
continue
+
m = ARGTYPES.match(item)
if m:
if m.group("E"):