edA-qa mort-ora-y
2013-Jul-29 03:49 UTC
[LLVMdev] PointerType without body, post-construction set type?
With StructType you can create an empty structure and then call setBody later. How can one do the same thing with a PointerType? I'm translating a recursive structure which includes pointers to itself. I end up creating multiple copies of logically equivalent pointer types. -- edA-qa mort-ora-y -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Sign: Please digitally sign your emails. Encrypt: I'm also happy to receive encrypted mail. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 261 bytes Desc: OpenPGP digital signature URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130729/5d1290e7/attachment.sig>
David Chisnall
2013-Jul-29 08:28 UTC
[LLVMdev] PointerType without body, post-construction set type?
You don't need to. First you create the struct type. Then you create a pointertype to the struct type. Then you create the body for the struct type, containing the pointer type (potentially multiple times). David On 29 Jul 2013, at 04:49, edA-qa mort-ora-y <eda-qa at disemia.com> wrote:> With StructType you can create an empty structure and then call setBody > later. How can one do the same thing with a PointerType? > > I'm translating a recursive structure which includes pointers to itself. > I end up creating multiple copies of logically equivalent pointer types. > > -- > edA-qa mort-ora-y > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > Sign: Please digitally sign your emails. > Encrypt: I'm also happy to receive encrypted mail. > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev