[LLVMdev] More kinds of recursive types in llvm
Rafael EspĂndola
rafael.espindola at gmail.com
Thu Feb 5 14:20:00 PST 2015
On 30 January 2015 at 12:00, Rodney M. Bates <rodney_bates at lcwb.coop> wrote:
> The language I am working on connecting to an llvm back-end (Modula-3)
> allows a fairly extensive set of recursive declarations. It looks
> like I can translate all its high-level types using four llvm types that
> refer to another type: function, struct, pointer, and array.
>
> It looks like I can alter an llvm struct type in place after it has
> been created, using StructType::setBody. I don't see a way to do this
> for the other three.
The current idea it to go the other way actually: have a single
pointer type and remove cycles. See
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141201/247285.html
for some of the discussion.
You can just cast one pointer type to another for now.
Cheers,
Rafael
More information about the llvm-dev
mailing list