summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-03-21 17:20:51 +0000
committerChris Lattner <sabre@nondot.org>2008-03-21 17:20:51 +0000
commit45c5e8b7dcf9abbc07b19df1af7c0f50f11b3d66 (patch)
tree070fe41e68beb64b64269fce0827b47d2ebc9b27 /docs
parent7623716e613032cff6c3d6808a19f0091ba9f4e8 (diff)
downloadllvm-45c5e8b7dcf9abbc07b19df1af7c0f50f11b3d66.tar.gz
llvm-45c5e8b7dcf9abbc07b19df1af7c0f50f11b3d66.tar.bz2
llvm-45c5e8b7dcf9abbc07b19df1af7c0f50f11b3d66.tar.xz
cleanups for the getresult section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48650 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/LangRef.html23
1 files changed, 13 insertions, 10 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html
index d0d7f5f5ea..dc37ec6076 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -3899,24 +3899,27 @@ argument.</p>
<h5>Syntax:</h5>
<pre>
- &lt;resultval&gt; = getresult &lt;type&gt; &lt;retval&gt;, &lt;index&gt;
+ &lt;resultval&gt; = getresult &lt;type&gt; &lt;retval&gt;, &lt;index&gt;
</pre>
+
<h5>Overview:</h5>
<p> The '<tt>getresult</tt>' instruction is used to extract individual values
-from multiple values returned by a '<tt><a href="#i_call">call</a></tt>'
-or '<tt><a href="#i_invoke">invoke</a></tt>' instruction.
+from a '<tt><a href="#i_call">call</a></tt>'
+or '<tt><a href="#i_invoke">invoke</a></tt>' instruction that returns multiple
+results.</p>
<h5>Arguments:</h5>
-The '<tt>getresult</tt>' instruction takes a return value as first argument.
-The value must have <a href="#t_struct">structure type</a>. The second argument
-is an unsigned index value.
+<p>The '<tt>getresult</tt>' instruction takes a call or invoke value as its
+first argument. The value must have <a href="#t_struct">structure type</a>.
+The second argument is an unsigned index value which must be in range for
+the number of values returned by the call.</p>
<h5>Semantics:</h5>
-The '<tt>getresult</tt>' instruction extracts the element identified by
-'<tt>index</tt>' from the aggregate value.
+<p>The '<tt>getresult</tt>' instruction extracts the element identified by
+'<tt>index</tt>' from the aggregate value.</p>
<h5>Example:</h5>
@@ -3924,8 +3927,8 @@ The '<tt>getresult</tt>' instruction extracts the element identified by
%struct.A = type { i32, i8 }
%r = call %struct.A @foo()
- %gr = getresult %struct.A %r, 0
- %gr1 = getresult %struct.A %r, 1
+ %gr = getresult %struct.A %r, 0 <i>; yields i32:%gr</i>
+ %gr1 = getresult %struct.A %r, 1 <i>; yields i8:%gr1</i>
add i32 %gr, 42
add i8 %gr1, 41
</pre>