[llvm] r185024 - ARM: Proactively ensure that the LowerCallResult hack for 'this'-returns is not used for incompatible calling conventions.

Eric Christopher echristo at gmail.com
Wed Jun 26 15:18:11 PDT 2013


On Wed, Jun 26, 2013 at 3:12 PM, Stephen Lin <stephenwlin at gmail.com> wrote:
>> Is it actually returning NULL in these cases or should it? Also the
>> comment looks weird underneath the line :)
>
> It should in the future, in case the situation arises...(I am just
> being proactive to reduce the chance of something silently adding a
> calling convention that causes this to break in the future...)
>
> I will make this clearer.
>

Cool deal. Just seemed a bit opaque on reading. :)

>>
>>
>>> +  // getThisReturnPreservedMask - Returns a call preserved mask specific to the
>>> +  // case that 'returned' is  an i32 first argument if the calling convention
>>> +  // is one that can (partially) model this attribute with a preserved mask
>>> +  // (i.e. it is a calling convention that uses the same register for the first
>>> +  // i32 argument and an i32 return value)
>>> +  //
>>> +  // Should return NULL in the case that the calling convention does not have
>>> +  // this property
>>> +  const uint32_t *getThisReturnPreservedMask(CallingConv::ID) const;
>>> +
>>
>> Doxygen style comments would be good here matching the ones above.
>
> Hmm, do I just need to change "//" to "///"? I have not actually
> learned the rules -- I've just mimicked what I've seen and assumed
> doxygen would figure it out :)
>

"Yes, but..." For this file that should work, however, there's a new
and different doxygen style that's being used (and should be used)
with \brief etc.

I don't know what the consequences of mixing are here. I've just been
following the existing style of the file. Someone else may though :)

-eric



More information about the llvm-commits mailing list