summaryrefslogtreecommitdiffstats
path: root/llvm/docs/LangRef.html
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-11-09 18:40:39 +0000
committerDan Gohman <gohman@apple.com>2009-11-09 18:40:39 +0000
commit66c4d610103b1a0f1487a2daf3b390021b952601 (patch)
tree21fae1c753847ecb7918d560aea2b2570000895f /llvm/docs/LangRef.html
parente4310c8273a9f7f0f32fa180b02acf29a29aa18c (diff)
downloadbcm5719-llvm-66c4d610103b1a0f1487a2daf3b390021b952601.tar.gz
bcm5719-llvm-66c4d610103b1a0f1487a2daf3b390021b952601.zip
Remove the "special case" for zero-length arrays, and rephrase this
paragraph to be more precise. llvm-svn: 86572
Diffstat (limited to 'llvm/docs/LangRef.html')
-rw-r--r--llvm/docs/LangRef.html13
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/docs/LangRef.html b/llvm/docs/LangRef.html
index eea1f030609..be2b93b5a03 100644
--- a/llvm/docs/LangRef.html
+++ b/llvm/docs/LangRef.html
@@ -1576,12 +1576,13 @@ Classifications</a> </div>
</tr>
</table>
-<p>Note that 'variable sized arrays' can be implemented in LLVM with a zero
- length array. Normally, accesses past the end of an array are undefined in
- LLVM (e.g. it is illegal to access the 5th element of a 3 element array). As
- a special case, however, zero length arrays are recognized to be variable
- length. This allows implementation of 'pascal style arrays' with the LLVM
- type "<tt>{ i32, [0 x float]}</tt>", for example.</p>
+<p>Except when the <tt>inbounds</tt> keyword is present, there is no limitation
+ on indexing beyond the end of the array implied by the static type (though
+ any loads or stores must of course be within the bounds of the allocated
+ object!). This means that single-dimension 'variable sized array' addressing
+ can be implemented in LLVM with a zero length array type. An implementation
+ of 'pascal style arrays' in LLVM could use the type
+ "<tt>{ i32, [0 x float]}</tt>", for example.</p>
<p>Note that the code generator does not yet support large aggregate types to be
used as function return types. The specific limit on how large an aggregate
OpenPOWER on IntegriCloud