mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-04 07:32:13 +00:00
Fix the running of ocaml tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111626 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f7af931930
commit
8a78ff63c0
@ -1,5 +1,5 @@
|
|||||||
(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_analysis.cmxa %s -o %t
|
(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_analysis.cmxa %s -o %t
|
||||||
* RUN: %t %t.bc
|
* RUN: %t
|
||||||
*)
|
*)
|
||||||
|
|
||||||
open Llvm
|
open Llvm
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_target.cmxa llvm_executionengine.cmxa %s -o %t
|
(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_target.cmxa llvm_executionengine.cmxa %s -o %t
|
||||||
* RUN: %t %t.bc
|
* RUN: %t
|
||||||
*)
|
*)
|
||||||
|
|
||||||
open Llvm
|
open Llvm
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_scalar_opts.cmxa llvm_target.cmxa %s -o %t
|
(* 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
|
(* 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
|
let void_type = Llvm.void_type context
|
||||||
|
|
||||||
(* Tiny unit test framework - really just to help find which line is busted *)
|
(* Tiny unit test framework - really just to help find which line is busted *)
|
||||||
|
let print_checkpoints = false
|
||||||
|
|
||||||
let suite name f =
|
let suite name f =
|
||||||
prerr_endline (name ^ ":");
|
if print_checkpoints then
|
||||||
|
prerr_endline (name ^ ":");
|
||||||
f ()
|
f ()
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
(* RUN: %ocamlopt -warn-error A llvm.cmxa llvm_target.cmxa %s -o %t
|
(* 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
|
(* Note: It takes several seconds for ocamlopt to link an executable with
|
||||||
@ -8,13 +9,17 @@
|
|||||||
open Llvm
|
open Llvm
|
||||||
open Llvm_target
|
open Llvm_target
|
||||||
|
|
||||||
|
|
||||||
let context = global_context ()
|
let context = global_context ()
|
||||||
let i32_type = Llvm.i32_type context
|
let i32_type = Llvm.i32_type context
|
||||||
let i64_type = Llvm.i64_type context
|
let i64_type = Llvm.i64_type context
|
||||||
|
|
||||||
(* Tiny unit test framework - really just to help find which line is busted *)
|
(* Tiny unit test framework - really just to help find which line is busted *)
|
||||||
|
let print_checkpoints = false
|
||||||
|
|
||||||
let suite name f =
|
let suite name f =
|
||||||
prerr_endline (name ^ ":");
|
if print_checkpoints then
|
||||||
|
prerr_endline (name ^ ":");
|
||||||
f ()
|
f ()
|
||||||
|
|
||||||
|
|
||||||
|
@ -455,7 +455,7 @@ let test_constants () =
|
|||||||
ignore (define_global "const_shufflevector" (const_shufflevector
|
ignore (define_global "const_shufflevector" (const_shufflevector
|
||||||
(const_vector [| zero; one |])
|
(const_vector [| zero; one |])
|
||||||
(const_vector [| one; zero |])
|
(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
|
group "asm"; begin
|
||||||
let ft = function_type void_type [| i32_type; i32_type; i32_type |] in
|
let ft = function_type void_type [| i32_type; i32_type; i32_type |] in
|
||||||
@ -1236,13 +1236,19 @@ let test_builder () =
|
|||||||
|
|
||||||
group "dbg"; begin
|
group "dbg"; begin
|
||||||
(* RUN: grep {%dbg = add i32 %P1, %P2, !dbg !1} < %t.ll
|
(* 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
|
insist ((current_debug_location atentry) = None);
|
||||||
let m2 = mdstring context "dbg test" in
|
|
||||||
let md = mdnode context [| m1; m2 |] in
|
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;
|
set_current_debug_location atentry md;
|
||||||
|
|
||||||
|
insist ((current_debug_location atentry) = Some md);
|
||||||
|
|
||||||
let i = build_add p1 p2 "dbg" atentry in
|
let i = build_add p1 p2 "dbg" atentry in
|
||||||
insist ((has_metadata i) = true);
|
insist ((has_metadata i) = true);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user