Page MenuHomePhabricator

[AsmWriter] Do not write a comma when varargs is the only argument
ClosedPublic

Authored by caojoshua on Nov 12 2022, 7:10 AM.

Details

Summary

Fixes https://github.com/llvm/llvm-project/issues/56544

AsmWriter always writes ", ..." when a tail call has a varargs argument. This patch only writes the ", " when there is an argument before the varargs argument.

I did not write a dedicated test this for this change, but I modified an existing test that will test for a regression.

Diff Detail

Event Timeline

caojoshua created this revision.Nov 12 2022, 7:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 12 2022, 7:10 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
caojoshua edited the summary of this revision. (Show Details)Nov 12 2022, 7:26 AM
caojoshua published this revision for review.Nov 12 2022, 8:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 12 2022, 8:17 AM
caojoshua edited the summary of this revision. (Show Details)Nov 12 2022, 8:37 AM
avogelsgesang accepted this revision.Nov 12 2022, 2:48 PM
avogelsgesang added a subscriber: avogelsgesang.

LGTM, with small nit:

There is a typo in the commit description

I did not write a dedicated this for this change

should be

I did not write a dedicated test for this change

Please fix before merging

This revision is now accepted and ready to land.Nov 12 2022, 2:48 PM
caojoshua edited the summary of this revision. (Show Details)Nov 12 2022, 5:29 PM

LGTM, with small nit:

There is a typo in the commit description

I did not write a dedicated this for this change

should be

I did not write a dedicated test for this change

Please fix before merging

Thank you. I fixed it.

Can I get help pushing this? This is my first contribution, and I do not have permissions.

Can you provide me a git patch, including the meta data (email address, ...)?
Not sure how to get this from Differential, I am rather inexperienced with it myself...

I have my git commit in in my github fork

commit 50a55613441151671f6a49982acea9fb043f7d5e
Author: Joshua Cao <cao.joshua@yahoo.com>
Date:   Sun Nov 13 22:24:15 2022 -0500

    [AsmWriter] Do not write a comma when varargs is the only argument
    
    Fixes https://github.com/llvm/llvm-project/issues/56544
    
    AsmWriter always writes ", ..." when a tail call has a varargs argument. This patch only writes the ", " when there is an argument before the varargs argument.
    
    I did not write a dedicated test this for this change, but I modified an existing test that will test for a regression.
    
    Reviewed By: avogelsgesang
    
    Differential Revision: https://reviews.llvm.org/D137893
This revision was landed with ongoing or failed builds.Nov 14 2022, 2:46 AM
This revision was automatically updated to reflect the committed changes.

Pushed upstream. Thank you for the fix!