From 45c5e8b7dcf9abbc07b19df1af7c0f50f11b3d66 Mon Sep 17 00:00:00 2001
From: Chris Lattner
Date: Fri, 21 Mar 2008 17:20:51 +0000
Subject: [PATCH] cleanups for the getresult section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48650 91177308-0d34-0410-b5e6-96231b3b80d8
---
docs/LangRef.html | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/docs/LangRef.html b/docs/LangRef.html
index d0d7f5f5ea1..dc37ec60766 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -3899,24 +3899,27 @@ argument.
Syntax:
- <resultval> = getresult <type> <retval>, <index>
+ <resultval> = getresult <type> <retval>, <index>
+
Overview:
The 'getresult' instruction is used to extract individual values
-from multiple values returned by a 'call'
-or 'invoke' instruction.
+from a 'call'
+or 'invoke' instruction that returns multiple
+results.
Arguments:
-The 'getresult' instruction takes a return value as first argument.
-The value must have structure type. The second argument
-is an unsigned index value.
+The 'getresult' instruction takes a call or invoke value as its
+first argument. The value must have structure type.
+The second argument is an unsigned index value which must be in range for
+the number of values returned by the call.
Semantics:
-The 'getresult' instruction extracts the element identified by
-'index' from the aggregate value.
+The 'getresult' instruction extracts the element identified by
+'index' from the aggregate value.
Example:
@@ -3924,8 +3927,8 @@ The 'getresult' 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 ; yields i32:%gr
+ %gr1 = getresult %struct.A %r, 1 ; yields i8:%gr1
add i32 %gr, 42
add i8 %gr1, 41