opposite to CreateStructGEP

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

opposite to CreateStructGEP

edA-qa mort-ora-y
Does getelementptr have a counterpart function which unindexes a
pointer? In particular, I'm using CreateStructGEP from the builder and
want to get back to the struct pointer from a member pointer.

fptr = b.CreateStructGEP( sptr, 2 );

//I want to do this
sptr = b.CreateUnStructGEP( fptr, sptr_type, 2 );


I know I can calculate the offsets on my own, but it'd be nice to not
have to since GEP already does it in the forward direction.

--
edA-qa mort-ora-y
Leaf Creator

Leaf - the language we always wanted
http://leaflang.org/
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev