[LLVMdev] PointerType without body, post-construction set type?

David Chisnall David.Chisnall at cl.cam.ac.uk
Mon Jul 29 01:28:28 PDT 2013


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





More information about the llvm-dev mailing list