[LLVMdev] dragonegg svn still broken

Duncan Sands baldrick at free.fr
Tue Jul 26 00:58:34 PDT 2011

Hi Jay,

> On 26 July 2011 08:01, Duncan Sands<baldrick at free.fr>  wrote:
>>> Right, there are similar cases involving function pointers etc.  For example, here's an evil case where converting a struct converts a function pointer that wants the struct being converted (kudos to Eli):
>>> struct foo {
>>>     void (*FP)(struct foo);
>>> } g;
>> I don't understand this - are function types with an opaque argument type not
>> allowed?  If so, why aren't they allowed?
> As I understand it, conversion from a C function type to an LLVM
> function type depends on target ABI details like whether a struct is
> passed in multiple integer registers, and you can only work this out
> properly if the parameter types and return type are complete.

I just checked and indeed LLVM does allow a function type to have an argument
of opaque type.  So presumably you are right and the problem came from clang
exploding in it's ABI conformance logic, rather than from an LLVM limitation.

Ciao, Duncan.

More information about the llvm-dev mailing list