diff options
author | Erick Tryzelaar <idadesub@users.sourceforge.net> | 2010-08-20 14:51:22 +0000 |
---|---|---|
committer | Erick Tryzelaar <idadesub@users.sourceforge.net> | 2010-08-20 14:51:22 +0000 |
commit | f7af931930dfab74b8a72b195e53df34b4ea2480 (patch) | |
tree | 5446119778568375fbf3c8cd3620cb2aec5381a5 /test/Bindings/Ocaml | |
parent | e12741055015ef5b98e1225834fcece0a3f04029 (diff) |
Expose LLVMSetOperand and LLVMGetNumOperands to llvm-c and ocaml.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111625 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Bindings/Ocaml')
-rw-r--r-- | test/Bindings/Ocaml/vmcore.ml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Bindings/Ocaml/vmcore.ml b/test/Bindings/Ocaml/vmcore.ml index ba8c6962a5..2894637e2b 100644 --- a/test/Bindings/Ocaml/vmcore.ml +++ b/test/Bindings/Ocaml/vmcore.ml @@ -642,11 +642,18 @@ let test_users () = let p1 = param fn 0 in let p2 = param fn 1 in + let a3 = build_alloca i32_type "user_alloca" b in + let p3 = build_load a3 "user_load" b in let i = build_add p1 p2 "sum" b in + insist ((num_operands i) = 2); insist ((operand i 0) = p1); insist ((operand i 1) = p2); + set_operand i 1 p3; + insist ((operand i 1) != p2); + insist ((operand i 1) = p3); + ignore (build_unreachable b) |