Wrapping Value::dump.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42668 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gordon Henriksen 2007-10-06 00:08:49 +00:00
parent acd96191cd
commit 88cc699942
5 changed files with 13 additions and 0 deletions

View 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 dump_value : llvalue -> unit = "llvm_dump_value"
(*--... Operations on constants of (mostly) any type .......................--*)
external is_constant : llvalue -> bool = "llvm_is_constant"

View 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 dump_value : llvalue -> unit = "llvm_dump_value"
(*--... Operations on constants of (mostly) any type .......................--*)
external is_constant : llvalue -> bool = "llvm_is_constant"

View File

@ -219,6 +219,12 @@ CAMLprim value llvm_set_value_name(value Name, LLVMValueRef Val) {
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 */

View File

@ -225,6 +225,7 @@ LLVMTypeRef LLVMCreateOpaqueType();
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 */

View File

@ -194,6 +194,10 @@ void LLVMSetValueName(LLVMValueRef Val, const char *Name) {
unwrap(Val)->setName(Name);
}
void LLVMDumpValue(LLVMValueRef Val) {
unwrap(Val)->dump();
}
/*--.. Operations on constants of any type .................................--*/
LLVMValueRef LLVMGetNull(LLVMTypeRef Ty) {