Test "external" modifier on global variable
authorChris Lattner <sabre@nondot.org>
Sun, 6 Oct 2002 22:32:38 +0000 (22:32 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 6 Oct 2002 22:32:38 +0000 (22:32 +0000)
Fix getelementptr instruction to use long isntead of uint index

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4047 91177308-0d34-0410-b5e6-96231b3b80d8

test/Feature/globalvars.ll

index a01c20b234d761192c0bca442122ba42fbc875d2..674341d64b219fa3304e8ea26ddc34abfa5fe3b5 100644 (file)
@@ -1,7 +1,7 @@
 
 %MyVar     = uninitialized global int
 %MyIntList = uninitialized global { \2 *, int }
-             uninitialized global int      ; int*:0
+             external global int      ; int*:0
 
 %AConst    = constant int 123
 
@@ -12,7 +12,7 @@ implementation
 int "foo"(int %blah)
 begin
        store int 5, int *%MyVar
-       %idx = getelementptr { \2 *, int } * %MyIntList, uint 0, ubyte 1
+       %idx = getelementptr { \2 *, int } * %MyIntList, long 0, ubyte 1
        store int 12, int* %idx
        ret int %blah
 end