mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-27 13:30:05 +00:00
Expose Module::dump via C and Ocaml.
Patch by Erick Tryzelaar. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48379 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3c5da81df8
commit
af59b105bb
@ -119,6 +119,7 @@ external define_type_name : string -> lltype -> llmodule -> bool
|
|||||||
= "llvm_add_type_name"
|
= "llvm_add_type_name"
|
||||||
external delete_type_name : string -> llmodule -> unit
|
external delete_type_name : string -> llmodule -> unit
|
||||||
= "llvm_delete_type_name"
|
= "llvm_delete_type_name"
|
||||||
|
external dump_module : llmodule -> unit = "llvm_dump_module"
|
||||||
|
|
||||||
(*===-- Types -------------------------------------------------------------===*)
|
(*===-- Types -------------------------------------------------------------===*)
|
||||||
|
|
||||||
|
@ -98,6 +98,12 @@ CAMLprim value llvm_delete_type_name(value Name, LLVMModuleRef M) {
|
|||||||
return Val_unit;
|
return Val_unit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* llmodule -> unit */
|
||||||
|
CAMLprim value llvm_dump_module(LLVMModuleRef M) {
|
||||||
|
LLVMDumpModule(M);
|
||||||
|
return Val_unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*===-- Types -------------------------------------------------------------===*/
|
/*===-- Types -------------------------------------------------------------===*/
|
||||||
|
|
||||||
|
@ -183,6 +183,9 @@ void LLVMSetTarget(LLVMModuleRef M, const char *Triple);
|
|||||||
int LLVMAddTypeName(LLVMModuleRef M, const char *Name, LLVMTypeRef Ty);
|
int LLVMAddTypeName(LLVMModuleRef M, const char *Name, LLVMTypeRef Ty);
|
||||||
void LLVMDeleteTypeName(LLVMModuleRef M, const char *Name);
|
void LLVMDeleteTypeName(LLVMModuleRef M, const char *Name);
|
||||||
|
|
||||||
|
/** See Module::dump. */
|
||||||
|
void LLVMDumpModule(LLVMModuleRef M);
|
||||||
|
|
||||||
|
|
||||||
/*===-- Types -------------------------------------------------------------===*/
|
/*===-- Types -------------------------------------------------------------===*/
|
||||||
|
|
||||||
|
@ -76,6 +76,10 @@ void LLVMDeleteTypeName(LLVMModuleRef M, const char *Name) {
|
|||||||
TST.remove(I);
|
TST.remove(I);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLVMDumpModule(LLVMModuleRef M) {
|
||||||
|
unwrap(M)->dump();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*===-- Operations on types -----------------------------------------------===*/
|
/*===-- Operations on types -----------------------------------------------===*/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user