Wrapping Value::dump.
authorGordon Henriksen <gordonhenriksen@mac.com>
Sat, 6 Oct 2007 00:08:49 +0000 (00:08 +0000)
committerGordon Henriksen <gordonhenriksen@mac.com>
Sat, 6 Oct 2007 00:08:49 +0000 (00:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42668 91177308-0d34-0410-b5e6-96231b3b80d8

bindings/ocaml/llvm/llvm.ml
bindings/ocaml/llvm/llvm.mli
bindings/ocaml/llvm/llvm_ocaml.c
include/llvm-c/Core.h
lib/VMCore/Core.cpp

index 63079f21072692ba1b4b022551d27bceb1b5a5e3..5121291cea5b200a75243f8d28cba9df5cf20066 100644 (file)
@@ -181,6 +181,7 @@ let label_type = _label_type ()
 external type_of : llvalue -> lltype = "llvm_type_of"
 external value_name : llvalue -> string = "llvm_value_name"
 external set_value_name : string -> llvalue -> unit = "llvm_set_value_name"
 external type_of : llvalue -> lltype = "llvm_type_of"
 external value_name : llvalue -> string = "llvm_value_name"
 external set_value_name : string -> llvalue -> unit = "llvm_set_value_name"
+external dump_value : llvalue -> unit = "llvm_dump_value"
 
 (*--... Operations on constants of (mostly) any type .......................--*)
 external is_constant : llvalue -> bool = "llvm_is_constant"
 
 (*--... Operations on constants of (mostly) any type .......................--*)
 external is_constant : llvalue -> bool = "llvm_is_constant"
index 627594170b2bf050d2cd5ff39d34dcacd688405a..85b93ae19dee1dde09235e403f6720aea29138ee 100644 (file)
@@ -164,6 +164,7 @@ val label_type : lltype
 external type_of : llvalue -> lltype = "llvm_type_of"
 external value_name : llvalue -> string = "llvm_value_name"
 external set_value_name : string -> llvalue -> unit = "llvm_set_value_name"
 external type_of : llvalue -> lltype = "llvm_type_of"
 external value_name : llvalue -> string = "llvm_value_name"
 external set_value_name : string -> llvalue -> unit = "llvm_set_value_name"
+external dump_value : llvalue -> unit = "llvm_dump_value"
 
 (*--... Operations on constants of (mostly) any type .......................--*)
 external is_constant : llvalue -> bool = "llvm_is_constant"
 
 (*--... Operations on constants of (mostly) any type .......................--*)
 external is_constant : llvalue -> bool = "llvm_is_constant"
index f53ad3c6d34b63a4e3a3c0fc50228eee303a8701..bc6e0b70f096660b2a88fb9437bf53e24729b014 100644 (file)
@@ -219,6 +219,12 @@ CAMLprim value llvm_set_value_name(value Name, LLVMValueRef Val) {
   return Val_unit;
 }
 
   return Val_unit;
 }
 
+/* llvalue -> unit */
+CAMLprim value llvm_dump_value(LLVMValueRef Val) {
+  LLVMDumpValue(Val);
+  return Val_unit;
+}
+
 /*--... Operations on constants of (mostly) any type .......................--*/
 
 /* llvalue -> bool */
 /*--... Operations on constants of (mostly) any type .......................--*/
 
 /* llvalue -> bool */
index fb01b8373520001891a9c064c75efce317c7457e..a9ed27b420142f480f23504e5cad7aecdd9e1a3d 100644 (file)
@@ -225,6 +225,7 @@ LLVMTypeRef LLVMCreateOpaqueType();
 LLVMTypeRef LLVMTypeOf(LLVMValueRef Val);
 const char *LLVMGetValueName(LLVMValueRef Val);
 void LLVMSetValueName(LLVMValueRef Val, const char *Name);
 LLVMTypeRef LLVMTypeOf(LLVMValueRef Val);
 const char *LLVMGetValueName(LLVMValueRef Val);
 void LLVMSetValueName(LLVMValueRef Val, const char *Name);
+void LLVMDumpValue(LLVMValueRef Val);
 
 /* Operations on constants of any type */
 LLVMValueRef LLVMGetNull(LLVMTypeRef Ty); /* all zeroes */
 
 /* Operations on constants of any type */
 LLVMValueRef LLVMGetNull(LLVMTypeRef Ty); /* all zeroes */
index b6a825462ae10361988c0046c90f40600703e50c..c63534df6c614ae4a215cbda0a21d538194f2b25 100644 (file)
@@ -194,6 +194,10 @@ void LLVMSetValueName(LLVMValueRef Val, const char *Name) {
   unwrap(Val)->setName(Name);
 }
 
   unwrap(Val)->setName(Name);
 }
 
+void LLVMDumpValue(LLVMValueRef Val) {
+  unwrap(Val)->dump();
+}
+
 /*--.. Operations on constants of any type .................................--*/
 
 LLVMValueRef LLVMGetNull(LLVMTypeRef Ty) {
 /*--.. Operations on constants of any type .................................--*/
 
 LLVMValueRef LLVMGetNull(LLVMTypeRef Ty) {