r226707 - Add the "thunk" attribute to MS ABI virtual member pointers

Hans Wennborg hans at chromium.org
Thu Jan 22 11:42:22 PST 2015


Merged in r226853 and r226854.

Thanks,
Hans

On Thu, Jan 22, 2015 at 11:29 AM, Reid Kleckner <rnk at google.com> wrote:
> Yes, let's merge it, and David's instcombine change r226708.
>
> On Thu, Jan 22, 2015 at 10:03 AM, Hans Wennborg <hans at chromium.org> wrote:
>>
>> On Wed, Jan 21, 2015 at 2:18 PM, Reid Kleckner <reid at kleckner.net> wrote:
>> > Author: rnk
>> > Date: Wed Jan 21 16:18:17 2015
>> > New Revision: 226707
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=226707&view=rev
>> > Log:
>> > Add the "thunk" attribute to MS ABI virtual member pointers
>> >
>> > This attribute implies indicates that the function musttail calls
>> > another function and returns whatever it returns. The return type of the
>> > thunk is meaningless, as the thunk can dynamically call different
>> > functions with different return types. So long as the callers bitcast
>> > the thunk with the correct type, behavior is well defined.
>> >
>> > This attribute was necessary to fix PR20944, where the indirect call
>> > combiner noticed that the thunk returned void and replaced the results
>> > of the indirect call instruction with undef.
>> >
>> > Over-the-shoulder reviewed by David Majnemer.
>>
>> Is this a fix we want in 3.6?
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>



More information about the cfe-commits mailing list