C and Objective Caml bindings for GlobalVariable::isConstant.
[oota-llvm.git] / test / Bindings / Ocaml / vmcore.ml
index 0282241d0c9cc76b0c5bff4fc694b37c26c63f6e..8aa6e43603eda9cdbd52e4f1817c9f0e2a15b1e5 100644 (file)
@@ -418,7 +418,15 @@ let test_global_variables () =
    *)
   group "delete";
   let g = define_global "GVar05" fourty_two32 m in
-  delete_global g
+  delete_global g;
+
+  (* RUN: grep -v {ConstGlobalVar.*constant} < %t.ll
+   *)
+  group "constant";
+  let g = define_global "ConstGlobalVar" fourty_two32 m in
+  insist (not (is_global_constant g));
+  set_global_constant true g;
+  insist (is_global_constant g)
 
 
 (*===-- Functions ---------------------------------------------------------===*)