[LLVMdev] must store instructions really have the exact same type pointer?

Jeremy Lakeman Jeremy.Lakeman at gmail.com
Mon Dec 2 16:52:51 PST 2013


Named structure types are no longer merged, though they used to be.



On Tue, Dec 3, 2013 at 4:41 AM, edA-qa mort-ora-y <eda-qa at disemia.com>wrote:

> I'm getting frustrated by assertions whenever I create a store inst (via
> builder CreateStore). I get the error "Ptr must be a pointer to Val
> type!" My destination is a pointer to an equivalent to the source type.
> The problem is that the types were created via different generation
> paths and the underlying structure is a distinct object (with the exact
> same fields).
>
> I seem to recall that IR actually merges equivalent types, so I'm always
> confused about this error. My type manager already has lots of extra
> code just trying to merge types, but I seem to have missed one.  If the
> assert were removed would the code actually work? Could the assert
> perhaps do a more logical check of equivalence?
>
> --
> edA-qa mort-ora-y
> Leaf Creator
>
> Leaf - the language we always wanted
> http://leaflang.org/
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131203/cd326a04/attachment.html>


More information about the llvm-dev mailing list