[llvm] r242104 - Add capability to get and set the personalitty function from the C API

Andrew Wilkins axwalk at gmail.com
Thu Jul 16 16:04:42 PDT 2015


On Fri, 17 Jul 2015 at 06:10 Duncan P. N. Exon Smith <dexonsmith at apple.com>
wrote:

>
> > On 2015-Jul-13, at 18:23, Andrew Wilkins <axwalk at gmail.com> wrote:
> >
> > Author: axw
> > Date: Mon Jul 13 20:23:06 2015
> > New Revision: 242104
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=242104&view=rev
> > Log:
> > Add capability to get and set the personalitty function from the C API
> >
> > Summary:
> > The capability was lost with D10429
>
> If that corresponds to an SVN commit (maybe it doesn't?), it's really
> much better to reference that.  I don't have a great way of looking up
> what D10429 means.  SVN revisions are the canonical way of referencing
> commits.
>

In this case I was the reviewer and just happened to commit, but I've done
this myself too. I'll try to remember that for future, and pass it on to
reviewees. The SVN rev for this is rL242104.

> where the personality function was set at function level rather than
> landing pad level. Now there is no way to get/set the personality function
> from the C API. That is a problem.
> >
> > Note that the whole thing could be avoided by improving the C API
> testing, as started by D10725
> >
> > Reviewers: chandlerc, bogner, majnemer, andrew.w.kaylor, rafael, rnk, axw
> >
> > Subscribers: rafael, llvm-commits
> >
> > Differential Revision: http://reviews.llvm.org/D10946
> >
> > Modified:
> >    llvm/trunk/include/llvm-c/Core.h
> >    llvm/trunk/lib/IR/Core.cpp
> >
> > Modified: llvm/trunk/include/llvm-c/Core.h
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Core.h?rev=242104&r1=242103&r2=242104&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/include/llvm-c/Core.h (original)
> > +++ llvm/trunk/include/llvm-c/Core.h Mon Jul 13 20:23:06 2015
> > @@ -1888,6 +1888,20 @@ LLVMValueRef LLVMAddAlias(LLVMModuleRef
> > void LLVMDeleteFunction(LLVMValueRef Fn);
> >
> > /**
> > + * Obtain the personality function attached to the function.
> > + *
> > + * @see llvm::Function::getPersonalityFn()
> > + */
> > +LLVMValueRef LLVMGetPersonalityFn(LLVMValueRef Fn);
> > +
> > +/**
> > + * Set the personality function attached to the function.
> > + *
> > + * @see llvm::Function::setPersonalityFn()
> > + */
> > +void LLVMSetPersonalityFn(LLVMValueRef Fn, LLVMValueRef PersonalityFn);
> > +
> > +/**
> >  * Obtain the ID number from a function instance.
> >  *
> >  * @see llvm::Function::getIntrinsicID()
> >
> > Modified: llvm/trunk/lib/IR/Core.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Core.cpp?rev=242104&r1=242103&r2=242104&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/lib/IR/Core.cpp (original)
> > +++ llvm/trunk/lib/IR/Core.cpp Mon Jul 13 20:23:06 2015
> > @@ -1691,6 +1691,14 @@ void LLVMDeleteFunction(LLVMValueRef Fn)
> >   unwrap<Function>(Fn)->eraseFromParent();
> > }
> >
> > +LLVMValueRef LLVMGetPersonalityFn(LLVMValueRef Fn) {
> > +  return wrap(unwrap<Function>(Fn)->getPersonalityFn());
> > +}
> > +
> > +void LLVMSetPersonalityFn(LLVMValueRef Fn, LLVMValueRef PersonalityFn) {
> > +
> unwrap<Function>(Fn)->setPersonalityFn(unwrap<Constant>(PersonalityFn));
> > +}
> > +
> > unsigned LLVMGetIntrinsicID(LLVMValueRef Fn) {
> >   if (Function *F = dyn_cast<Function>(unwrap(Fn)))
> >     return F->getIntrinsicID();
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150716/28dff308/attachment.html>


More information about the llvm-commits mailing list