diff options
author | Erick Tryzelaar <idadesub@users.sourceforge.net> | 2010-02-28 09:46:06 +0000 |
---|---|---|
committer | Erick Tryzelaar <idadesub@users.sourceforge.net> | 2010-02-28 09:46:06 +0000 |
commit | c59286bff1cca8c4fa15f390c9002db94117614e (patch) | |
tree | a814f992425526d661e141c95d4a273cc32bd19a /test/Bindings | |
parent | 46c80e0c5653e11ada7cebcb46f9a8f7df758e41 (diff) | |
download | external_llvm-c59286bff1cca8c4fa15f390c9002db94117614e.zip external_llvm-c59286bff1cca8c4fa15f390c9002db94117614e.tar.gz external_llvm-c59286bff1cca8c4fa15f390c9002db94117614e.tar.bz2 |
Add indirect br support to llvm-c and ocaml.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97376 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Bindings')
-rw-r--r-- | test/Bindings/Ocaml/vmcore.ml | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Bindings/Ocaml/vmcore.ml b/test/Bindings/Ocaml/vmcore.ml index 57a8425..9a2f547 100644 --- a/test/Bindings/Ocaml/vmcore.ml +++ b/test/Bindings/Ocaml/vmcore.ml @@ -897,6 +897,23 @@ let test_builder () = let si = build_switch p1 bb3 1 (builder_at_end context bb1) in ignore (add_case si (const_int i32_type 2) bb2) end; + + group "indirectbr"; begin + (* RUN: grep {indirectbr i8\\* blockaddress(@X7, %IBRBlock2), \\\[label %IBRBlock2, label %IBRBlock3\\\]} < %t.ll + *) + let bb1 = append_block context "IBRBlock1" fn in + + let bb2 = append_block context "IBRBlock2" fn in + ignore (build_unreachable (builder_at_end context bb2)); + + let bb3 = append_block context "IBRBlock3" fn in + ignore (build_unreachable (builder_at_end context bb3)); + + let addr = block_address fn bb2 in + let ibr = build_indirect_br addr 2 (builder_at_end context bb1) in + ignore (add_destination ibr bb2); + ignore (add_destination ibr bb3) + end; group "invoke"; begin (* RUN: grep {build_invoke.*invoke.*P1.*P2} < %t.ll |