gdb/make-target-delegates.py: don't handle "void" in parse_argtypes

Message ID 20240416155229.1543806-1-simon.marchi@polymtl.ca
State New
Headers
Series gdb/make-target-delegates.py: don't handle "void" in parse_argtypes |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 warning Patch is already merged
linaro-tcwg-bot/tcwg_gdb_build--master-arm warning Patch is already merged

Commit Message

Simon Marchi April 16, 2024, 3:52 p.m. UTC
  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

John Baldwin April 16, 2024, 4:06 p.m. UTC | #1
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>
  
Simon Marchi April 16, 2024, 4:14 p.m. UTC | #2
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
  

Patch

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"):