llvm.org GIT mirror llvm / af59b10
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 Gordon Henriksen 11 years ago
4 changed file(s) with 14 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
118118 = "llvm_add_type_name"
119119 external delete_type_name : string -> llmodule -> unit
120120 = "llvm_delete_type_name"
121 external dump_module : llmodule -> unit = "llvm_dump_module"
121122
122123 (*===-- Types -------------------------------------------------------------===*)
123124
9494 /* string -> llmodule -> unit */
9595 CAMLprim value llvm_delete_type_name(value Name, LLVMModuleRef M) {
9696 LLVMDeleteTypeName(M, String_val(Name));
97 return Val_unit;
98 }
99
100 /* llmodule -> unit */
101 CAMLprim value llvm_dump_module(LLVMModuleRef M) {
102 LLVMDumpModule(M);
97103 return Val_unit;
98104 }
99105
181181 /** See Module::addTypeName. */
182182 int LLVMAddTypeName(LLVMModuleRef M, const char *Name, LLVMTypeRef Ty);
183183 void LLVMDeleteTypeName(LLVMModuleRef M, const char *Name);
184
185 /** See Module::dump. */
186 void LLVMDumpModule(LLVMModuleRef M);
184187
185188
186189 /*===-- Types -------------------------------------------------------------===*/
7575 TST.remove(I);
7676 }
7777
78 void LLVMDumpModule(LLVMModuleRef M) {
79 unwrap(M)->dump();
80 }
81
7882
7983 /*===-- Operations on types -----------------------------------------------===*/
8084