From 42686afc017ef1913fbecf8d43ce96f51a458559 Mon Sep 17 00:00:00 2001 From: Jeffrey Yasskin Date: Mon, 11 Jan 2010 19:19:26 +0000 Subject: [PATCH] Improve unclear bits and inaccuracies in structure and insertvalue documentation. Patch by Dustin Laurence! llvm-svn: 93170 --- docs/LangRef.html | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/LangRef.html b/docs/LangRef.html index 22a2d161548..bc276ebe928 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -1656,10 +1656,12 @@ Classifications underlying processor. The elements of a structure may be any type that has a size.

-

Structures are accessed using 'load and - 'store' by getting a pointer to a field with - the 'getelementptr' instruction.

- +

Structures in memory are accessed using 'load' + and 'store' by getting a pointer to a field + with the 'getelementptr' instruction. + Structures in registers are accessed using the + 'extractvalue' and + 'insertvalue' instructions.

Syntax:
   { <type list> }
@@ -3858,7 +3860,7 @@ Instruction 
 
 
Syntax:
-  <result> = insertvalue <aggregate type> <val>, <ty> <val>, <idx>    ; yields <n x <ty>>
+  <result> = insertvalue <aggregate type> <val>, <ty> <elt>, <idx>    ; yields <aggregate type>
 
Overview:
@@ -3883,7 +3885,8 @@ Instruction
Example:
-  <result> = insertvalue {i32, float} %agg, i32 1, 0    ; yields {i32, float}
+  %agg1 = insertvalue {i32, float} undef, i32 1, 0         ; yields {i32 1, float undef}
+  %agg2 = insertvalue {i32, float} %agg1, float %val, 1    ; yields {i32 1, float %val}