The inbounds keyword isn't relevant to overindexing of

static array types. Thanks to Duncan for pointing this out!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86576 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2009-11-09 19:01:53 +00:00
parent eaa181c83a
commit 7657f6b002

View File

@ -1576,13 +1576,12 @@ Classifications</a> </div>
</tr> </tr>
</table> </table>
<p>Except when the <tt>inbounds</tt> keyword is present, there is no limitation <p>There is no restriction on indexing beyond the end of the array implied by
on indexing beyond the end of the array implied by the static type (though a static type (though there are restrictions on indexing beyond the bounds
any loads or stores must of course be within the bounds of the allocated of an allocated object in some cases). This means that single-dimension
object!). This means that single-dimension 'variable sized array' addressing 'variable sized array' addressing can be implemented in LLVM with a zero
can be implemented in LLVM with a zero length array type. An implementation length array type. An implementation of 'pascal style arrays' in LLVM could
of 'pascal style arrays' in LLVM could use the type use the type "<tt>{ i32, [0 x float]}</tt>", for example.</p>
"<tt>{ i32, [0 x float]}</tt>", for example.</p>
<p>Note that the code generator does not yet support large aggregate types to be <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 used as function return types. The specific limit on how large an aggregate