mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
Fix the running of ocaml tests.
llvm-svn: 111626
This commit is contained in:
parent
68c31295f7
commit
d2ba02571e
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 context = global_context ()
|
||||
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 ()
|
||||
|
||||
|
||||
|
@ -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 ()
|
||||
|
||||
|
||||
|
@ -455,7 +455,7 @@ let test_constants () =
|
||||
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 @@ let test_builder () =
|
||||
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user