[LLVMdev] Invalid bitcode signature

Chris Lattner clattner at apple.com
Tue Feb 7 11:18:34 PST 2012


On Feb 7, 2012, at 1:29 AM, Fraser Cormack wrote:

> 
> Sorry, I was being an idiot and was trying to link the wrong file type. Sigh.
> 
> Now I have a problem where I merge two modules each containing the same
> struct, one opaque and one defined, and it's not merging the two
> consistently. I have two, let's say
> 
> %"StructA" = type opaque
> %"StructB" = type opaque
> 
> in one module, and in the other:
> 
> %"StructA" = type { i8 }
> %"StructB" = type  { [0 x i8] }
> 
> and when I link the two modules, only one is correctly defined:
> 
> %"StructA" = { i8 }
> %"StructB" = type opaque
> %"StructB.0" =  { [0 x i8] }
> 
> I know it's not technically 'on-topic' for this thread, but just in case you
> had any ideas as to why this is happening.

Are you using mainline or LLVM 3.0?  The behavior in this area has changed since 3.0 was released (and it should now do what you want).

-Chris

> 
> Cheers/
> 
> 
> Duncan Sands wrote:
>> 
>> Hi Fraser,
>> 
>> it can, for example by generating human readable IR rather than bitcode.
>> Why don't you look in the file and see what's in there?
>> 
>> Ciao, Duncan.
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>> 
>> 
> 
> -- 
> View this message in context: http://old.nabble.com/Invalid-bitcode-signature-tp33259763p33277355.html
> Sent from the LLVM - Dev mailing list archive at Nabble.com.
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list