summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorErick Tryzelaar <idadesub@users.sourceforge.net>2010-02-28 20:44:58 +0000
committerErick Tryzelaar <idadesub@users.sourceforge.net>2010-02-28 20:44:58 +0000
commit6ba5c56cf5b1609ec4af45f4901118865a8ed9b6 (patch)
treea6a741a16910346705cf544436801520ff08f995 /test
parentce89b4e66f7ec82b2b621c94b072f0b22827a3cd (diff)
Add support for global aliases to ocaml.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97413 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Bindings/Ocaml/vmcore.ml9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Bindings/Ocaml/vmcore.ml b/test/Bindings/Ocaml/vmcore.ml
index 40747f3611..1b7200b19f 100644
--- a/test/Bindings/Ocaml/vmcore.ml
+++ b/test/Bindings/Ocaml/vmcore.ml
@@ -606,6 +606,14 @@ let test_global_variables () =
dispose_module m
end
+(*===-- Aliases -----------------------------------------------------------===*)
+
+let test_aliases () =
+ (* RUN: grep {@alias = alias i32\\* @aliasee} < %t.ll
+ *)
+ let v = declare_global i32_type "aliasee" m in
+ ignore (add_alias m (pointer_type i32_type) v "alias")
+
(*===-- Functions ---------------------------------------------------------===*)
@@ -1265,6 +1273,7 @@ let _ =
suite "constants" test_constants;
suite "global values" test_global_values;
suite "global variables" test_global_variables;
+ suite "aliases" test_aliases;
suite "functions" test_functions;
suite "params" test_params;
suite "basic blocks" test_basic_blocks;