diff --git a/docs/GetElementPtr.html b/docs/GetElementPtr.html index 49c3e6563a4..08d8006e459 100644 --- a/docs/GetElementPtr.html +++ b/docs/GetElementPtr.html @@ -78,12 +78,13 @@ AType* Foo; ... X = &Foo->F; -
it is natural to think that there is only one index, the constant value - 1. This results from C allowing you to treat pointers and arrays as - equivalent. LLVM doesn't. In this example, Foo is a pointer. That pointer must - be indexed. To arrive at the same address location as the C code, you would - provide the GEP instruction with two indices. The first indexes through the - pointer, the second index the element of the structure just as if it was:
+it is natural to think that there is only one index, the selection of the + field F. However, in this example, Foo is a pointer. That + pointer must be indexed explicitly in LLVM. C, on the other hand, indexs + through it ransparently. To arrive at the same address location as the C + code, you would provide the GEP instruction with two index operands. The + first operand indexes through the pointer; the second operand indexes the + field F of the structure, just as if you wrote:
X = &Foo[0].F;
Sometimes this question gets rephrased as: