> > Hi Dale, maybe you could use IntrinsicInst::StripPointerCasts instead? > > Didn't know about this, thanks. It recurses and I don't think that's > what I want in this case. I did, however, steal its looping code:)
Are you sure you don't want it to be recursive? I can take a global variable, bitcast it, do a GEP 0 on that, bitcast the result, etc. The final result will be equivalent to a single bitcast of the original global. So shouldn't this code handle it? Of course if the optimizers are run then they would simplify such a silly example. But it seems wrong to me to assume that the IR has been optimized... Best wishes, Duncan. _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits