[PATCH] Use function attribute "trap-func-name" and remove TargetOptions::TrapFuncName

Eric Christopher echristo at gmail.com
Tue Jun 30 12:54:43 PDT 2015


How would you deal with inlining?

-eric

On Tue, Jun 30, 2015 at 12:53 PM Akira Hatanaka <ahatanak at gmail.com> wrote:

> In http://reviews.llvm.org/D10832#197327, @echristo wrote:
>
> > I think that'll cause problems when we merge translation units at module
> >  link time? i.e. we only have one llvm.trap intrinsic.
>
>
> Attaching the attribute to the declaration of llvm.trap would cause
> problems when linking modules, but attaching it to the call site should be
> fine. The linked module looks like this:
>
> declare void @llvm.trap() #2
> ...
> call void @llvm.trap() #4
> ...
> call void @llvm.trap() #5
> ...
> attributes #2 = { noreturn nounwind }
> attributes #4 = { noreturn nounwind "trap-func-name"="foo112" }
> attributes #5 = { noreturn nounwind "trap-func-name"="foo111" }
>
>
> http://reviews.llvm.org/D10832
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150630/f0f5add8/attachment.html>


More information about the llvm-commits mailing list