[llvm-branch-commits] [llvm-branch] r247191 - Merge r242372 to 3.7 so that it goes out in 3.7.1
Reid Kleckner via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Sep 9 14:03:25 PDT 2015
Author: rnk
Date: Wed Sep 9 16:03:25 2015
New Revision: 247191
URL: http://llvm.org/viewvc/llvm-project?rev=247191&view=rev
Log:
Merge r242372 to 3.7 so that it goes out in 3.7.1
It restores the signature of LLVMBuildLandingPad in the C API back to what it
was in 3.6 and earlier.
The 3.7.0 release should have had this but it did not.
Modified:
llvm/branches/release_37/ (props changed)
llvm/branches/release_37/bindings/go/llvm/ir.go
llvm/branches/release_37/bindings/ocaml/llvm/llvm_ocaml.c
llvm/branches/release_37/include/llvm-c/Core.h
llvm/branches/release_37/lib/IR/Core.cpp
Propchange: llvm/branches/release_37/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Sep 9 16:03:25 2015
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,242236,242239,242281,242288,242296,242331,242341,242410,242412,242433-242434,242442,242543,242673,242680,242706,242721-242722,242733-242735,242742,242869,242919,242993,243001,243057,243116,243263,243294,243361,243469,243485,243500,243519,243531,243589,243609,243636,243638-243640,243745,243891,243898,243927,243932,243934,243984,243986,243999,244058,244123,244232,244332,244418,244448,244554,244644,244659,244676,244789,244889,245064,245105,245119,245256,245355,245365,245369,245394-245395,245530,245535,245902
+/llvm/trunk:155241,242236,242239,242281,242288,242296,242331,242341,242372,242410,242412,242433-242434,242442,242543,242673,242680,242706,242721-242722,242733-242735,242742,242869,242919,242993,243001,243057,243116,243263,243294,243361,243469,243485,243500,243519,243531,243589,243609,243636,243638-243640,243745,243891,243898,243927,243932,243934,243984,243986,243999,244058,244123,244232,244332,244418,244448,244554,244644,244659,244676,244789,244889,245064,245105,245119,245256,245355,245365,245369,245394-245395,245530,245535,245902
Modified: llvm/branches/release_37/bindings/go/llvm/ir.go
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_37/bindings/go/llvm/ir.go?rev=247191&r1=247190&r2=247191&view=diff
==============================================================================
--- llvm/branches/release_37/bindings/go/llvm/ir.go (original)
+++ llvm/branches/release_37/bindings/go/llvm/ir.go Wed Sep 9 16:03:25 2015
@@ -1728,7 +1728,7 @@ func (b Builder) CreatePtrDiff(lhs, rhs
func (b Builder) CreateLandingPad(t Type, personality Value, nclauses int, name string) (l Value) {
cname := C.CString(name)
defer C.free(unsafe.Pointer(cname))
- l.C = C.LLVMBuildLandingPad(b.C, t.C, C.unsigned(nclauses), cname)
+ l.C = C.LLVMBuildLandingPad(b.C, t.C, nil, C.unsigned(nclauses), cname)
return l
}
Modified: llvm/branches/release_37/bindings/ocaml/llvm/llvm_ocaml.c
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_37/bindings/ocaml/llvm/llvm_ocaml.c?rev=247191&r1=247190&r2=247191&view=diff
==============================================================================
--- llvm/branches/release_37/bindings/ocaml/llvm/llvm_ocaml.c (original)
+++ llvm/branches/release_37/bindings/ocaml/llvm/llvm_ocaml.c Wed Sep 9 16:03:25 2015
@@ -1745,7 +1745,7 @@ CAMLprim LLVMValueRef llvm_build_invoke_
CAMLprim LLVMValueRef llvm_build_landingpad(LLVMTypeRef Ty, LLVMValueRef PersFn,
value NumClauses, value Name,
value B) {
- return LLVMBuildLandingPad(Builder_val(B), Ty, Int_val(NumClauses),
+ return LLVMBuildLandingPad(Builder_val(B), Ty, PersFn, Int_val(NumClauses),
String_val(Name));
}
Modified: llvm/branches/release_37/include/llvm-c/Core.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_37/include/llvm-c/Core.h?rev=247191&r1=247190&r2=247191&view=diff
==============================================================================
--- llvm/branches/release_37/include/llvm-c/Core.h (original)
+++ llvm/branches/release_37/include/llvm-c/Core.h Wed Sep 9 16:03:25 2015
@@ -2675,7 +2675,8 @@ LLVMValueRef LLVMBuildInvoke(LLVMBuilder
LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch,
const char *Name);
LLVMValueRef LLVMBuildLandingPad(LLVMBuilderRef B, LLVMTypeRef Ty,
- unsigned NumClauses, const char *Name);
+ LLVMValueRef PersFn, unsigned NumClauses,
+ const char *Name);
LLVMValueRef LLVMBuildResume(LLVMBuilderRef B, LLVMValueRef Exn);
LLVMValueRef LLVMBuildUnreachable(LLVMBuilderRef);
Modified: llvm/branches/release_37/lib/IR/Core.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_37/lib/IR/Core.cpp?rev=247191&r1=247190&r2=247191&view=diff
==============================================================================
--- llvm/branches/release_37/lib/IR/Core.cpp (original)
+++ llvm/branches/release_37/lib/IR/Core.cpp Wed Sep 9 16:03:25 2015
@@ -2257,7 +2257,14 @@ LLVMValueRef LLVMBuildInvoke(LLVMBuilder
}
LLVMValueRef LLVMBuildLandingPad(LLVMBuilderRef B, LLVMTypeRef Ty,
- unsigned NumClauses, const char *Name) {
+ LLVMValueRef PersFn, unsigned NumClauses,
+ const char *Name) {
+ // The personality used to live on the landingpad instruction, but now it
+ // lives on the parent function. For compatibility, take the provided
+ // personality and put it on the parent function.
+ if (PersFn)
+ unwrap(B)->GetInsertBlock()->getParent()->setPersonalityFn(
+ cast<Function>(unwrap(PersFn)));
return wrap(unwrap(B)->CreateLandingPad(unwrap(Ty), NumClauses, Name));
}
More information about the llvm-branch-commits
mailing list