[LLVMdev] StructType for dispatch_object_t changed by Linker

Jaymie Strecker jstrecker at kosada.com
Fri Dec 14 11:39:15 PST 2012


Jean-Daniel, 

>>> Probably the types are not defined precisely the same in each module (maybe you
>>> could send the exact definitions in each module to the mailing list?), 
>> 
>> 
>> In the module loaded in Step 1 (otherModule): 
>> 
>> %struct.dispatch_group_s = type opaque
>> %union.dispatch_object_t = type { %struct.dispatch_object_s* }
>> %struct.dispatch_object_s = type opaque
>> 
>> In the module generated in Step 2 (mainModule): 
>> 
>> %struct.dispatch_group_s = type {}
>> %union.dispatch_object_t = type { %struct.dispatch_object_s* }
>> %struct.dispatch_object_s = type {}
>> 
>> (The LLVM API calls to generate mainModule were generated by calling `llc -march=cpp` on otherModule.) 
>> 
> 
> Is there any chance one module was compiled in C mode and the other one in C++ mode ?
> 
> The dispatch_object declarations are not the same for both languages:

Good question, but I don't think that's it. When otherModule is compiled as C++ code, the types are completely different: 

%struct.dispatch_group_s = type { i8 }
%struct.dispatch_object_s = type { i8 }

-Jaymie

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121214/587d9290/attachment.html>


More information about the llvm-dev mailing list