aboutsummaryrefslogtreecommitdiffstats
path: root/test/Bindings
diff options
context:
space:
mode:
authorTorok Edwin <edwintorok@gmail.com>2011-10-03 06:41:46 +0000
committerTorok Edwin <edwintorok@gmail.com>2011-10-03 06:41:46 +0000
commit48488a64fadb2f99706029e51ae4c06fcfac5cdb (patch)
treec60f5c57a1d50b22acfb0336a3d2663a499bd39f /test/Bindings
parent4fcc80a486300021d320aec8cd125022ef701e5b (diff)
downloadexternal_llvm-48488a64fadb2f99706029e51ae4c06fcfac5cdb.zip
external_llvm-48488a64fadb2f99706029e51ae4c06fcfac5cdb.tar.gz
external_llvm-48488a64fadb2f99706029e51ae4c06fcfac5cdb.tar.bz2
attempt to fix ocaml bindings: landing pads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140991 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Bindings')
-rw-r--r--test/Bindings/Ocaml/vmcore.ml16
1 files changed, 13 insertions, 3 deletions
diff --git a/test/Bindings/Ocaml/vmcore.ml b/test/Bindings/Ocaml/vmcore.ml
index fa60398..d65bf37 100644
--- a/test/Bindings/Ocaml/vmcore.ml
+++ b/test/Bindings/Ocaml/vmcore.ml
@@ -834,7 +834,17 @@ let test_builder () =
let bb00 = append_block context "Bb00" fn in
ignore (build_unreachable (builder_at_end context bb00));
-
+
+ let bblpad = append_block context "Bblpad" fn in
+ let rt = struct_type context [| pointer_type i8_type; i32_type |] in
+ let ft = var_arg_function_type i32_type [||] in
+ let personality = declare_function "__gxx_personality_v0" ft m in begin
+ let lp = build_landingpad rt personality 0 "lpad"
+ (builder_at_end context bblpad) in
+ set_cleanup lp true;
+ ignore (build_unreachable (builder_at_end context bblpad));
+ end;
+
group "ret"; begin
(* RUN: grep {ret.*P1} < %t.ll
*)
@@ -891,11 +901,11 @@ let test_builder () =
group "invoke"; begin
(* RUN: grep {build_invoke.*invoke.*P1.*P2} < %t.ll
- * RUN: grep {to.*Bb04.*unwind.*Bb00} < %t.ll
+ * RUN: grep {to.*Bb04.*unwind.*Bblpad} < %t.ll
*)
let bb04 = append_block context "Bb04" fn in
let b = builder_at_end context bb04 in
- ignore (build_invoke fn [| p1; p2 |] bb04 bb00 "build_invoke" b)
+ ignore (build_invoke fn [| p1; p2 |] bb04 bblpad "build_invoke" b)
end;
group "unreachable"; begin