Skip to content
Commit 9da94483 authored by Reid Kleckner's avatar Reid Kleckner
Browse files

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.

llvm-svn: 226707
parent f9a30ddc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment