summaryrefslogtreecommitdiff
path: root/bindings/ocaml/llvm/llvm.mli
diff options
context:
space:
mode:
authorErick Tryzelaar <idadesub@users.sourceforge.net>2010-02-28 09:46:21 +0000
committerErick Tryzelaar <idadesub@users.sourceforge.net>2010-02-28 09:46:21 +0000
commitd80ce75687c22e63d746d732b4e28fd5a1207a9d (patch)
tree4871de1b6f58cc6c104e82642ddb2aa92b59c65a /bindings/ocaml/llvm/llvm.mli
parent68bab9833db8d524398f7feee1ce4bda9df320ab (diff)
downloadllvm-d80ce75687c22e63d746d732b4e28fd5a1207a9d.tar.gz
llvm-d80ce75687c22e63d746d732b4e28fd5a1207a9d.tar.bz2
llvm-d80ce75687c22e63d746d732b4e28fd5a1207a9d.tar.xz
Add a way to look up a type by it's name in a module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97379 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings/ocaml/llvm/llvm.mli')
-rw-r--r--bindings/ocaml/llvm/llvm.mli5
1 files changed, 5 insertions, 0 deletions
diff --git a/bindings/ocaml/llvm/llvm.mli b/bindings/ocaml/llvm/llvm.mli
index 06ffed52cf..7025f85b54 100644
--- a/bindings/ocaml/llvm/llvm.mli
+++ b/bindings/ocaml/llvm/llvm.mli
@@ -274,6 +274,11 @@ external define_type_name : string -> lltype -> llmodule -> bool
external delete_type_name : string -> llmodule -> unit
= "llvm_delete_type_name"
+(** [type_by_name m n] returns the type in the module [m] named [n], or [None]
+ if it does not exist. See the method [llvm::Module::getTypeByName]. *)
+external type_by_name : llmodule -> string -> lltype option
+ = "llvm_type_by_name"
+
(** [dump_module m] prints the .ll representation of the module [m] to standard
error. See the method [llvm::Module::dump]. *)
external dump_module : llmodule -> unit = "llvm_dump_module"