[llvm] acf0717 - [Docs] Fix GEP type in example (#68533)

via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 9 02:56:26 PDT 2023


Author: Mariusz Sikora
Date: 2023-10-09T11:56:21+02:00
New Revision: acf07179e66992f4d9844818e094831fce791c5e

URL: https://github.com/llvm/llvm-project/commit/acf07179e66992f4d9844818e094831fce791c5e
DIFF: https://github.com/llvm/llvm-project/commit/acf07179e66992f4d9844818e094831fce791c5e.diff

LOG: [Docs] Fix GEP type in example (#68533)

Added: 
    

Modified: 
    llvm/docs/GetElementPtr.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/GetElementPtr.rst b/llvm/docs/GetElementPtr.rst
index b08c99c6cee69bb..9ba6218fadfbd2a 100644
--- a/llvm/docs/GetElementPtr.rst
+++ b/llvm/docs/GetElementPtr.rst
@@ -200,7 +200,7 @@ fine:
 
   @MyVar = external global { i32, [40 x i32 ] }
   ...
-  %idx = getelementptr { [40 x i32] }, ptr @MyVal, i64 0, i32 1, i64 17
+  %idx = getelementptr { i32, [40 x i32] }, ptr @MyVar, i64 0, i32 1, i64 17
 
 In this case, the structure does not contain a pointer and the GEP instruction
 can index through the global variable, into the second field of the structure


        


More information about the llvm-commits mailing list