[LLVMdev] Wrong calling convention?

Óscar Fuentes ofv at wanadoo.es
Wed Mar 26 15:33:18 PDT 2008


David Vandevoorde <daveed at vandevoorde.com> writes:

>> I'll be interested on hearing ideas about how to determine how a
>> function returns a small struct, without knowing the internals of the
>> struct.
>
> You need to know _something_ about the internals.
[snip]

Well, as AFAIK there is no way of gathering that information, putting
some checks to ensure that the manually provided type info is correct
would be nice, but I'm afraid that there is no way to achieve that
either (except for the most simple checks, like the struct size not
being large than `double', etc). Boost type_traits does not mention g++
on the list of compilers that has the necessary intrinsics for
supporting has_trivial_copier et al.

I guess this is off-topic, so thank you all guys for your suggestions.

-- 
Oscar




More information about the llvm-dev mailing list