[LLVMdev] must store instructions really have the exact same type pointer?
edA-qa mort-ora-y
eda-qa at disemia.com
Mon Dec 2 10:11:03 PST 2013
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/
More information about the llvm-dev
mailing list