<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>I'm having a play with LLVM to implement a custom language (for my intellectual curiosity only). I'm wondering how, when using IRBuilder, one can can it to emit a recursive type definition? The code for TypeBuilder explicitly states that it doesn't handle recursive types...</div><div><br></div><div>I'm after being able to emit, programmatically, stuff like the Named Types example in the Language Reference:</div><div><br></div><div><pre style="overflow-x: auto; overflow-y: hidden; font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 0.95em; line-height: 15px; padding: 0.5em; border: 1px solid rgb(204, 204, 204); background-color: rgb(248, 248, 248); color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><span class="nv" style="color: rgb(187, 96, 213);">%mytype</span> <span class="p">=</span> <span class="k" style="color: rgb(0, 112, 32); font-weight: bold;">type</span> <span class="p">{</span> <span class="nv" style="color: rgb(187, 96, 213);">%mytype</span><span class="p">*,</span> <span class="k" style="color: rgb(0, 112, 32); font-weight: bold;">i32</span> <span class="p">}</span></pre><div>I'd welcome any advice!</div></div><div><br></div><div>Yours,</div><div>James Jackson.</div></body></html>