summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-03-05 02:21:50 +0000
committerReid Kleckner <reid@kleckner.net>2014-03-05 02:21:50 +0000
commitd6e0bca951b598bc98f5cf5f89a20214da3703ea (patch)
tree33fece3dd3aca107434188aa746df6fb5c729e4c /docs
parente6d0bedb065a9d5c063ca9125dbe70c5c223b134 (diff)
downloadllvm-d6e0bca951b598bc98f5cf5f89a20214da3703ea.tar.gz
llvm-d6e0bca951b598bc98f5cf5f89a20214da3703ea.tar.bz2
llvm-d6e0bca951b598bc98f5cf5f89a20214da3703ea.tar.xz
LangRef: Remove stale docs on LLVM types in module structure
The distinction between "identified" and "literal" struct types is fully documented in a later section. Patch by Philip Reames! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202927 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/LangRef.rst29
1 files changed, 10 insertions, 19 deletions
diff --git a/docs/LangRef.rst b/docs/LangRef.rst
index 52f916e237..06e6de65f0 100644
--- a/docs/LangRef.rst
+++ b/docs/LangRef.rst
@@ -471,31 +471,22 @@ DLL storage class:
exists for defining a dll interface, the compiler, assembler and linker know
it is externally referenced and must refrain from deleting the symbol.
-Named Types
------------
+Structure Types
+---------------
+
+LLVM IR allows you to specify both "identified" and "literal" :ref:`structure
+types <t_struct>`. Literal types are uniqued structurally, but identified types
+are never uniqued. An :ref:`opaque structural type <t_opaque>` can also be used
+to forward declare a type which is not yet available.
-LLVM IR allows you to specify name aliases for certain types. This can
-make it easier to read the IR and make the IR more condensed
-(particularly when recursive types are involved). An example of a name
-specification is:
+An example of a identified structure specification is:
.. code-block:: llvm
%mytype = type { %mytype*, i32 }
-You may give a name to any :ref:`type <typesystem>` except
-":ref:`void <t_void>`". Type name aliases may be used anywhere a type is
-expected with the syntax "%mytype".
-
-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 *one name* 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.
+Prior to the LLVM 3.0 release, identified types were structurally uniqued. Only
+literal types are uniqued in recent versions of LLVM.
.. _globalvars: