summaryrefslogtreecommitdiff
path: root/bindings/ocaml/llvm/llvm.mli
diff options
context:
space:
mode:
authorPeter Zotov <whitequark@whitequark.org>2013-11-14 06:34:13 +0000
committerPeter Zotov <whitequark@whitequark.org>2013-11-14 06:34:13 +0000
commita69773cead6dea09ade34342eafacf848ec41367 (patch)
tree5d06edd2e65a631dca06d32090160b02e9059f41 /bindings/ocaml/llvm/llvm.mli
parent732cf2d598b4c9ca47e9c32fbd2e7732d971bda6 (diff)
downloadllvm-a69773cead6dea09ade34342eafacf848ec41367.tar.gz
llvm-a69773cead6dea09ade34342eafacf848ec41367.tar.bz2
llvm-a69773cead6dea09ade34342eafacf848ec41367.tar.xz
[OCaml] Expose LLVM's fatal error and stacktrace APIs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194669 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings/ocaml/llvm/llvm.mli')
-rw-r--r--bindings/ocaml/llvm/llvm.mli15
1 files changed, 15 insertions, 0 deletions
diff --git a/bindings/ocaml/llvm/llvm.mli b/bindings/ocaml/llvm/llvm.mli
index e965b7ee7e..e996121793 100644
--- a/bindings/ocaml/llvm/llvm.mli
+++ b/bindings/ocaml/llvm/llvm.mli
@@ -361,6 +361,21 @@ type ('a, 'b) llrev_pos =
exception IoError of string
+(** {6 Global configuration} *)
+
+(** [enable_pretty_stacktraces ()] enables LLVM's built-in stack trace code.
+ This intercepts the OS's crash signals and prints which component of LLVM
+ you were in at the time of the crash. *)
+val enable_pretty_stacktrace : unit -> unit
+
+(** [install_fatal_error_handler f] installs [f] as LLVM's fatal error handler.
+ The handler will receive the reason for termination as a string. After
+ the handler has been executed, LLVM calls [exit(1)]. *)
+val install_fatal_error_handler : (string -> unit) -> unit
+
+(** [reset_fatal_error_handler ()] resets LLVM's fatal error handler. *)
+val reset_fatal_error_handler : unit -> unit
+
(** {6 Contexts} *)
(** [create_context ()] creates a context for storing the "global" state in