summaryrefslogtreecommitdiff
path: root/test/Feature/globalvars.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-09-10 07:58:01 +0000
committerChris Lattner <sabre@nondot.org>2001-09-10 07:58:01 +0000
commit70cc3397f84c2e1fd69c059a0ef89e398e847b00 (patch)
treeca2156daf75e4abf788d92925bdce4063da36e58 /test/Feature/globalvars.ll
parent7720c8e1a7a252e983e3f3e7f841d7901dfea80c (diff)
downloadllvm-70cc3397f84c2e1fd69c059a0ef89e398e847b00.tar.gz
llvm-70cc3397f84c2e1fd69c059a0ef89e398e847b00.tar.bz2
llvm-70cc3397f84c2e1fd69c059a0ef89e398e847b00.tar.xz
Implement global variable support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@530 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Feature/globalvars.ll')
-rw-r--r--test/Feature/globalvars.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Feature/globalvars.ll b/test/Feature/globalvars.ll
new file mode 100644
index 0000000000..ef3f336c9e
--- /dev/null
+++ b/test/Feature/globalvars.ll
@@ -0,0 +1,14 @@
+
+global %MyVar = int *
+global %MyIntList = { \2 *, int } *
+global int * ; int*:0
+
+implementation
+
+int "foo"(int %blah)
+begin
+ store int 5, int *%MyVar
+ store int 12, { \2 *, int } * %MyIntList, ubyte 1
+ ret int %blah
+end
+