[llvm-commits] [llvm] r111626 - in /llvm/trunk/test/Bindings/Ocaml: analysis.ml executionengine.ml scalar_opts.ml target.ml vmcore.ml
Erick Tryzelaar
idadesub at users.sourceforge.net
Fri Aug 20 07:51:27 PDT 2010
Author: erickt
Date: Fri Aug 20 09:51:26 2010
New Revision: 111626
URL: http://llvm.org/viewvc/llvm-project?rev=111626&view=rev
Log:
Fix the running of ocaml tests.
Modified:
llvm/trunk/test/Bindings/Ocaml/analysis.ml
llvm/trunk/test/Bindings/Ocaml/executionengine.ml
llvm/trunk/test/Bindings/Ocaml/scalar_opts.ml
llvm/trunk/test/Bindings/Ocaml/target.ml
llvm/trunk/test/Bindings/Ocaml/vmcore.ml
Modified: llvm/trunk/test/Bindings/Ocaml/analysis.ml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bindings/Ocaml/analysis.ml?rev=111626&r1=111625&r2=111626&view=diff
==============================================================================
--- llvm/trunk/test/Bindings/Ocaml/analysis.ml (original)
+++ llvm/trunk/test/Bindings/Ocaml/analysis.ml Fri Aug 20 09:51:26 2010
@@ -1,5 +1,5 @@
(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_analysis.cmxa %s -o %t
- * RUN: %t %t.bc
+ * RUN: %t
*)
open Llvm
Modified: llvm/trunk/test/Bindings/Ocaml/executionengine.ml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bindings/Ocaml/executionengine.ml?rev=111626&r1=111625&r2=111626&view=diff
==============================================================================
--- llvm/trunk/test/Bindings/Ocaml/executionengine.ml (original)
+++ llvm/trunk/test/Bindings/Ocaml/executionengine.ml Fri Aug 20 09:51:26 2010
@@ -1,5 +1,5 @@
(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_target.cmxa llvm_executionengine.cmxa %s -o %t
- * RUN: %t %t.bc
+ * RUN: %t
*)
open Llvm
Modified: llvm/trunk/test/Bindings/Ocaml/scalar_opts.ml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bindings/Ocaml/scalar_opts.ml?rev=111626&r1=111625&r2=111626&view=diff
==============================================================================
--- llvm/trunk/test/Bindings/Ocaml/scalar_opts.ml (original)
+++ llvm/trunk/test/Bindings/Ocaml/scalar_opts.ml Fri Aug 20 09:51:26 2010
@@ -1,4 +1,5 @@
(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_scalar_opts.cmxa llvm_target.cmxa %s -o %t
+ * RUN: %t %t.bc
*)
(* Note: It takes several seconds for ocamlopt to link an executable with
@@ -13,8 +14,11 @@
let void_type = Llvm.void_type context
(* Tiny unit test framework - really just to help find which line is busted *)
+let print_checkpoints = false
+
let suite name f =
- prerr_endline (name ^ ":");
+ if print_checkpoints then
+ prerr_endline (name ^ ":");
f ()
Modified: llvm/trunk/test/Bindings/Ocaml/target.ml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bindings/Ocaml/target.ml?rev=111626&r1=111625&r2=111626&view=diff
==============================================================================
--- llvm/trunk/test/Bindings/Ocaml/target.ml (original)
+++ llvm/trunk/test/Bindings/Ocaml/target.ml Fri Aug 20 09:51:26 2010
@@ -1,4 +1,5 @@
(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_target.cmxa %s -o %t
+ * RUN: %t %t.bc
*)
(* Note: It takes several seconds for ocamlopt to link an executable with
@@ -8,13 +9,17 @@
open Llvm
open Llvm_target
+
let context = global_context ()
let i32_type = Llvm.i32_type context
let i64_type = Llvm.i64_type context
(* Tiny unit test framework - really just to help find which line is busted *)
+let print_checkpoints = false
+
let suite name f =
- prerr_endline (name ^ ":");
+ if print_checkpoints then
+ prerr_endline (name ^ ":");
f ()
Modified: llvm/trunk/test/Bindings/Ocaml/vmcore.ml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bindings/Ocaml/vmcore.ml?rev=111626&r1=111625&r2=111626&view=diff
==============================================================================
--- llvm/trunk/test/Bindings/Ocaml/vmcore.ml (original)
+++ llvm/trunk/test/Bindings/Ocaml/vmcore.ml Fri Aug 20 09:51:26 2010
@@ -455,7 +455,7 @@
ignore (define_global "const_shufflevector" (const_shufflevector
(const_vector [| zero; one |])
(const_vector [| one; zero |])
- (const_bitcast foldbomb (vector_type i32_type 2))) m);
+ (const_vector [| const_int i32_type 1; const_int i32_type 2 |])) m);
group "asm"; begin
let ft = function_type void_type [| i32_type; i32_type; i32_type |] in
@@ -1236,13 +1236,19 @@
group "dbg"; begin
(* RUN: grep {%dbg = add i32 %P1, %P2, !dbg !1} < %t.ll
- * RUN: grep {!1 = metadata !\{i32 2, metadata !"dbg test"\}} < %t.ll
+ * RUN: grep {!1 = metadata !\{i32 2, i32 3, metadata !2, metadata !2\}} < %t.ll
*)
- let m1 = const_int i32_type 2 in
- let m2 = mdstring context "dbg test" in
- let md = mdnode context [| m1; m2 |] in
+ insist ((current_debug_location atentry) = None);
+
+ let m_line = const_int i32_type 2 in
+ let m_col = const_int i32_type 3 in
+ let m_scope = mdnode context [| |] in
+ let m_inlined = mdnode context [| |] in
+ let md = mdnode context [| m_line; m_col; m_scope; m_inlined |] in
set_current_debug_location atentry md;
+ insist ((current_debug_location atentry) = Some md);
+
let i = build_add p1 p2 "dbg" atentry in
insist ((has_metadata i) = true);
More information about the llvm-commits
mailing list