Hi all,<div><br></div><div>I have a trouble with LLVM rev - 147926 cast instructions. Here is my code:</div><div><br></div><div>............</div><div><div>for(std::vector<Value*>::iterator it = getElementPtrs.begin(); it != getElementPtrs.end(); ++it) {</div>
<div>                 Value* current = *it;</div><div>                 errs() << *current << "\n";</div><div>                 GetElementPtrInst* gep = cast<GetElementPtrInst>(current);</div><div>
                 assert(gep != NULL && "GetElementPtrInst must be valid!");</div></div><div>............</div><div><br></div><div>Program crashes with the above mentioned assertion. Here getElementPtrs is a vector of Values, that are GetElementPtrInst- s. errs() works fine. I've also tried to dyn_cast the value, but it doesn't work too.</div>
<div>Any ideas?</div><div><br></div><div>Sincerely,</div><div>Hripsime.</div>