[PATCH] pr13012: Support -fpcc-struct-return for x86-32
Jordan Rose
jordan_rose at apple.com
Mon Jun 10 12:25:25 PDT 2013
On Jun 9, 2013, at 22:57 , Arthur O'Dwyer <arthur.j.odwyer at gmail.com> wrote:
> On Fri, Jun 7, 2013 at 4:46 PM, John McCall <rjmccall at apple.com> wrote:
>> On Jun 7, 2013, at 4:42 PM, Arthur O'Dwyer <arthur.j.odwyer at gmail.com> wrote:
>>> On Fri, Jun 7, 2013 at 3:22 PM, John McCall <rjmccall at apple.com> wrote:
>>>> On Jun 7, 2013, at 12:07 PM, Arthur O'Dwyer <arthur.j.odwyer at gmail.com> wrote:
>>>>>
>>>>> +VALUE_CODEGENOPT(PassSmallStructsConvention, 2, 0) /// If
>>>>> -fpcc-struct-return (==1) or -freg-struct-return (==2) is specified.
>>>>
>>>> Use ENUM_CODEGENOPT instead of magic numbers, please.
>>>
>>> Fixed. I renamed this variable to SmallStructsConvention and the enum to
>>> SmallStructsConventionKind to save a bit of horizontal space.
>>> I removed the "default: assert(false);" case in my helper function, as it was
>>> now triggering a warning from -Wcovered-switch-default.
>>
>> How about "StructReturnConventionKind"?
>
> Fixed, although I realized afterward that this changes "SSC_" to "SRC_",
> which is slightly unfortunate ("SRC" being short for "source" in other
> contexts).
Maybe include the K for "Kind"? We're not consistent about this, but it would solve the immediate issue.
Jordan
More information about the cfe-commits
mailing list