diff options
author | Reid Kleckner <reid@kleckner.net> | 2015-07-16 01:16:39 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2015-07-16 01:16:39 +0000 |
commit | ef9828fb473164c881fb88f1669a2a4055e218f9 (patch) | |
tree | 8c957d5471c6bf5f80e45dd124ea30470ac4151f /llvm/lib/IR | |
parent | fa00728f5815b1c3146678a3c180d469761b0b65 (diff) | |
download | bcm5719-llvm-ef9828fb473164c881fb88f1669a2a4055e218f9.tar.gz bcm5719-llvm-ef9828fb473164c881fb88f1669a2a4055e218f9.zip |
Revert "Update LLVM bindings after r239940. ..."
Revert the changes to the C API LLVMBuildLandingPad that were part of
the personality function move. We now set the personality on the parent
function when the C API attempts to construct a landingpad with a
personality.
This reverts commit r240010.
llvm-svn: 242372
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r-- | llvm/lib/IR/Core.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp index e0e729d534b..0eb88a96757 100644 --- a/llvm/lib/IR/Core.cpp +++ b/llvm/lib/IR/Core.cpp @@ -2257,7 +2257,14 @@ LLVMValueRef LLVMBuildInvoke(LLVMBuilderRef B, LLVMValueRef Fn, } 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)); } |