[PATCH] D99450: [OCaml][Test] Fix and enable debuginfo.ml test.
Vaivaswatha Nagaraj via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 27 18:13:58 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG11f59c5457d5: [OCaml][Test] Fix and enable debuginfo.ml test (authored by vaivaswatha).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99450/new/
https://reviews.llvm.org/D99450
Files:
llvm/bindings/ocaml/debuginfo/debuginfo_ocaml.c
llvm/bindings/ocaml/debuginfo/llvm_debuginfo.ml
llvm/bindings/ocaml/debuginfo/llvm_debuginfo.mli
llvm/test/Bindings/OCaml/debuginfo.ml
llvm/test/Bindings/OCaml/debuginfo.ml.disable
Index: llvm/test/Bindings/OCaml/debuginfo.ml
===================================================================
--- llvm/test/Bindings/OCaml/debuginfo.ml
+++ llvm/test/Bindings/OCaml/debuginfo.ml
@@ -339,7 +339,7 @@
~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]]}
Index: llvm/bindings/ocaml/debuginfo/llvm_debuginfo.mli
===================================================================
--- llvm/bindings/ocaml/debuginfo/llvm_debuginfo.mli
+++ llvm/bindings/ocaml/debuginfo/llvm_debuginfo.mli
@@ -282,6 +282,11 @@
(** [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
Index: llvm/bindings/ocaml/debuginfo/llvm_debuginfo.ml
===================================================================
--- llvm/bindings/ocaml/debuginfo/llvm_debuginfo.ml
+++ llvm/bindings/ocaml/debuginfo/llvm_debuginfo.ml
@@ -262,6 +262,10 @@
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 ->
Index: llvm/bindings/ocaml/debuginfo/debuginfo_ocaml.c
===================================================================
--- llvm/bindings/ocaml/debuginfo/debuginfo_ocaml.c
+++ llvm/bindings/ocaml/debuginfo/debuginfo_ocaml.c
@@ -369,6 +369,14 @@
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) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99450.333704.patch
Type: text/x-patch
Size: 2739 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210328/f50c2405/attachment.bin>
More information about the llvm-commits
mailing list