projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a02784
)
[OCaml] Initialize local roots prior to raising.
author
Peter Zotov
<whitequark@whitequark.org>
Mon, 3 Nov 2014 09:51:44 +0000
(09:51 +0000)
committer
Peter Zotov
<whitequark@whitequark.org>
Mon, 3 Nov 2014 09:51:44 +0000
(09:51 +0000)
On 4.02, the OCaml unwinder otherwise gets confused and segfaults.
llvm-svn: 221142
llvm/bindings/ocaml/llvm/llvm_ocaml.c
patch
|
blob
|
history
diff --git
a/llvm/bindings/ocaml/llvm/llvm_ocaml.c
b/llvm/bindings/ocaml/llvm/llvm_ocaml.c
index
b43b375
..
d868288
100644
(file)
--- a/
llvm/bindings/ocaml/llvm/llvm_ocaml.c
+++ b/
llvm/bindings/ocaml/llvm/llvm_ocaml.c
@@
-1590,11
+1590,12
@@
CAMLprim value llvm_position_builder(value Pos, value B) {
}
/* llbuilder -> llbasicblock */
-CAMLprim LLVMBasicBlockRef llvm_insertion_block(value B) {
+CAMLprim value llvm_insertion_block(value B) {
+ CAMLparam0();
LLVMBasicBlockRef InsertBlock = LLVMGetInsertBlock(Builder_val(B));
if (!InsertBlock)
- raise_not_found();
-
return InsertBlock
;
+
caml_
raise_not_found();
+
CAMLreturn((value) InsertBlock)
;
}
/* llvalue -> string -> llbuilder -> unit */