aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorFrits van Bommel <fvbommel@gmail.com>2010-12-05 20:54:38 +0000
committerFrits van Bommel <fvbommel@gmail.com>2010-12-05 20:54:38 +0000
commit1324289d24a1c86c9e12c590218db42814ab0225 (patch)
treea703b21e218c255b05a02297f5cf3252f5ef0ac4 /docs
parenta4805cf6efbcd405916cdd0eb4b6170231e906c7 (diff)
Clarify some of the differences between indexing with getelementptr and indexing with insertvalue/extractvalue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120957 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/LangRef.html10
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html
index 68d65f1a97..76fa06f49c 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -4131,6 +4131,14 @@ Instruction</a> </div>
<a href="#t_array">array</a> type. The operands are constant indices to
specify which value to extract in a similar manner as indices in a
'<tt><a href="#i_getelementptr">getelementptr</a></tt>' instruction.</p>
+ <p>The major differences to <tt>getelementptr</tt> indexing are:</p>
+ <ul>
+ <li>Since the value being indexed is not a pointer, the first index is
+ omitted and assumed to be zero.</li>
+ <li>At least one index must be specified.</li>
+ <li>Not only struct indices but also array indices must be in
+ bounds.</li>
+ </ul>
<h5>Semantics:</h5>
<p>The result is the value at the position in the aggregate specified by the
@@ -4165,7 +4173,7 @@ Instruction</a> </div>
<a href="#t_array">array</a> type. The second operand is a first-class
value to insert. The following operands are constant indices indicating
the position at which to insert the value in a similar manner as indices in a
- '<tt><a href="#i_getelementptr">getelementptr</a></tt>' instruction. The
+ '<tt><a href="#i_extractvalue">extractvalue</a></tt>' instruction. The
value to insert must have the same type as the value identified by the
indices.</p>