<div dir="ltr">In the textual form of LLVM IR, forward references are legal, so you shouldn't need this kind of redeclaration. You example could be:<div>%TF = type i32 (%TO*)</div><div>%TO = type %TF</div><div><br></div><div>However, llvm-as rejects it with "error: forward references to non-struct type", but that's a different issue.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 22, 2015 at 10:31 AM, Rodney M. Bates <span dir="ltr"><<a href="mailto:rodney_bates@lcwb.coop" target="_blank">rodney_bates@lcwb.coop</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">According to the Assembly language reference: "In LLVM, opaque types can<br>
eventually be resolved to any type (not just a structure type)."  But<br>
the only way I can think of to do so is to give it a type name, then<br>
later redeclare the name.  But that gives an error:<br>
<br>
%TO = type opaque<br>
%TF = type i32 ( %TO* )<br>
%TO = type %TF<br>
<br>
gives:<br>
<br>
$ llvm-as types1.ll<br>
llvm-as: types1.ll:3:1: error: redefinition of type<br>
%TO = type %TF<br>
^<br>
<br>
Also, what is the set of things that can be done with an as-yet unresolved<br>
opaque type?<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<br>
-- <br>
Rodney Bates<br>
<a href="mailto:rodney.m.bates@acm.org" target="_blank">rodney.m.bates@acm.org</a><br>
______________________________<u></u>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a><br>
</font></span></blockquote></div><br></div>