<div dir="ltr">I can confirm that this seems to be out of date. In particular the sentence:<div><br></div><div>"Structures can either be “literal” or “identified”. A literal structure is defined inline with other types (e.g. {i32, i32}*) whereas identified types are always defined at the top level with a name. Literal types are uniqued by their contents and can never be recursive or opaque since there is no way to write one. Identified types can be recursive, can be opaqued, ****and are never uniqued****."</div>
<div><br></div><div><br></div><div>If you send a patch to llvm-commits removing that, we can get the ball rolling on bringing this up to date.</div><div><br></div><div>-- Sean Silva<br><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Jan 7, 2014 at 1:04 PM, Philip Reames <span dir="ltr"><<a href="mailto:listmail@philipreames.com" target="_blank">listmail@philipreames.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Looking at the LangRef, I see some wording relating to the type
system which appears to have not been updated. The section that
concerns me is:<br>
"
Note that type names are aliases for the structural type that they
indicate, and that you can therefore specify multiple names for the
same
type. This often leads to confusing behavior when dumping out a .ll
file. Since LLVM IR uses structural typing, the name is not part of
the
type. When printing out LLVM IR, the printer will pick <em>one name</em>
to
render all types of a particular shape. This means that if you have
code
where two different source types end up having the same LLVM type,
that
the dumper will sometimes print the “wrong” or unexpected type. This
is
an important design point and isn’t going to change." from
<a href="http://llvm.org/docs/LangRef.html#named-types" target="_blank">http://llvm.org/docs/LangRef.html#named-types</a><br>
<br>
In particular, this appears to be in direct contradiction with:<br>
<a href="http://llvm.org/docs/LangRef.html#structure-type" target="_blank">http://llvm.org/docs/LangRef.html#structure-type</a><br>
<br>
Can anyone else confirm my interpretation? I want to be sure
there's not something subtle here I'm missing.<span class=""><font color="#888888"><br>
<br>
Philip<br>
</font></span></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">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/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div></div></div>