mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[OCaml][Test] Fix and enable debuginfo.ml test
`get_or_create_type_array` was used on a non-type MDNode. Add interface for `get_or_create_array` and use that instead. Differential Revision: https://reviews.llvm.org/D99450
This commit is contained in:
parent
519ec4e15e
commit
60a545b91a
@ -369,6 +369,14 @@ CAMLprim LLVMMetadataRef llvm_dibuild_get_or_create_type_array(value Builder,
|
||||
Wosize_val(Data));
|
||||
}
|
||||
|
||||
CAMLprim LLVMMetadataRef llvm_dibuild_get_or_create_array(value Builder,
|
||||
value Data) {
|
||||
|
||||
return LLVMDIBuilderGetOrCreateArray(DIBuilder_val(Builder),
|
||||
(LLVMMetadataRef *)Op_val(Data),
|
||||
Wosize_val(Data));
|
||||
}
|
||||
|
||||
CAMLprim LLVMMetadataRef llvm_dibuild_create_subroutine_type(
|
||||
value Builder, LLVMMetadataRef File, value ParameterTypes, value Flags) {
|
||||
|
||||
|
@ -262,6 +262,10 @@ external dibuild_get_or_create_type_array :
|
||||
lldibuilder -> data:Llvm.llmetadata array -> Llvm.llmetadata
|
||||
= "llvm_dibuild_get_or_create_type_array"
|
||||
|
||||
external dibuild_get_or_create_array :
|
||||
lldibuilder -> data:Llvm.llmetadata array -> Llvm.llmetadata
|
||||
= "llvm_dibuild_get_or_create_array"
|
||||
|
||||
external dibuild_create_subroutine_type :
|
||||
lldibuilder ->
|
||||
file:Llvm.llmetadata ->
|
||||
|
@ -282,6 +282,11 @@ val dibuild_get_or_create_type_array :
|
||||
(** [dibuild_get_or_create_type_array] Create a type array.
|
||||
See LLVMDIBuilderGetOrCreateTypeArray. *)
|
||||
|
||||
val dibuild_get_or_create_array :
|
||||
lldibuilder -> data:Llvm.llmetadata array -> Llvm.llmetadata
|
||||
(** [dibuild_get_or_create_array] Create an array of DI Nodes.
|
||||
See LLVMDIBuilderGetOrCreateArray. *)
|
||||
|
||||
val dibuild_create_constant_value_expression :
|
||||
lldibuilder -> int -> Llvm.llmetadata
|
||||
(** [dibuild_create_constant_value_expression] Create a new descriptor for
|
||||
|
@ -339,7 +339,7 @@ let test_types dibuilder file_di m_di =
|
||||
~align_in_bits:0 ~elements ~class_ty:int64_ty_di
|
||||
in
|
||||
let elements_arr =
|
||||
Llvm_debuginfo.dibuild_get_or_create_type_array dibuilder ~data:elements
|
||||
Llvm_debuginfo.dibuild_get_or_create_array dibuilder ~data:elements
|
||||
in
|
||||
stdout_metadata elements_arr;
|
||||
(* CHECK: [[ELEMENTS_PTR:<0x[0-9a-f]*>]] = !{[[ENUMERATOR1_PTR]], [[ENUMERATOR2_PTR]], [[ENUMERATOR3_PTR]]}
|
Loading…
Reference in New Issue
Block a user