[cfe-dev] [LLVMdev] Handling SRet on Windows x86

Anton Korobeynikov asl at math.spbu.ru
Wed Mar 27 13:34:54 PDT 2013


Hi Timur,

> This way, Clang takes care of setting the SRet attribute wherever appropriate
> and LLVM takes care of putting such return values onto stack in the
> Win32/MSVC32 ABI.
>
> What do you think about such a proposal?
It depends on what you're planning to do with sret. If you're planning
to support C structs, then it's fine.

But it's definitely not ok for C++ classes, it will be much better for
frontend to expand everything into proper form depending on whether
the class is small / not, and whether it has non-trivial ctor / dtor
or not.

--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University



More information about the cfe-dev mailing list