From 85f5b5b9dcb16ddbb94b64bef02694872b02dc75 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Mon, 4 Dec 2006 21:29:24 +0000 Subject: [PATCH] We only support 32-bit or 64-bit sequential type indices for GEP. Document it as so. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32197 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LangRef.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/LangRef.html b/docs/LangRef.html index 7cbcef5b5cc..1ca56a18a4e 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -2492,14 +2492,14 @@ subelement of an aggregate data structure.

Arguments:
-

This instruction takes a list of integer constants that indicate what +

This instruction takes a list of integer operands that indicate what elements of the aggregate object to index to. The actual types of the arguments provided depend on the type of the first pointer argument. The 'getelementptr' instruction is used to index down through the type levels of a structure or to a specific index in an array. When indexing into a structure, only uint integer constants are allowed. When indexing -into an array or pointer, integers of any size are allowed, and will be sign -extended to 64-bit values.

+into an array or pointer, only integers of 32 or 64 bits are allowed, and will +be sign extended to 64-bit values.

For example, let's consider a C code fragment and how it gets compiled to LLVM:

@@ -2540,7 +2540,7 @@ compiled to LLVM:

The index types specified for the 'getelementptr' instruction depend on the pointer type that is being indexed into. Pointer -and array types can use any +and array types can use a 32-bit or 64-bit integer type but the value will always be sign extended to 64-bits. Structure types, require uint constants.

-- 2.34.1