diff --git a/docs/AdvancedGetElementPtr.html b/docs/AdvancedGetElementPtr.html index 65ccbc48291..a6baa132192 100644 --- a/docs/AdvancedGetElementPtr.html +++ b/docs/AdvancedGetElementPtr.html @@ -200,9 +200,9 @@ to null?
You can compute an address that way, but you can't use that pointer to - actually access the object if you do, unless the object is managed - outside of LLVM.
+You can compute an address that way, but if you use GEP to do the add, + you can't use that pointer to actually access the object, unless the + object is managed outside of LLVM.
The underlying integer computation is sufficiently defined; null has a defined value -- zero -- and you can add whatever value you want to it.
@@ -211,6 +211,11 @@ object with such a pointer. This includes GlobalVariables, Allocas, and objects pointed to by noalias pointers. +If you really need this functionality, you can do the arithmetic with + explicit integer instructions, and use inttoptr to convert the result to + an address. Most of GEP's special aliasing rules do not apply to pointers + computed from ptrtoint, arithmetic, and inttoptr sequences.
+As with arithmetic on null, You can compute an address that way, but - you can't use that pointer to actually access the object if you do, - unless the object is managed outside of LLVM.
+As with arithmetic on null, You can use GEP to compute an address that + way, but you can't use that pointer to actually access the object if you + do, unless the object is managed outside of LLVM.
+ +Also as above, ptrtoint and inttoptr provide an alternative way to do this + which do not have this restriction.