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

Eric Christopher echristo at gmail.com
Tue Jun 30 12:41:17 PDT 2015


I think that'll cause problems when we merge translation units at module
link time? i.e. we only have one llvm.trap intrinsic.

-eric

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

> Thanks.
>
> I realized while reading the review comments that I could attach the
> attribute to the CallInst instead of the caller function. That way, we can
> don't have to check that two functions have the same "trap-func-name" value
> when the functions are inlined or merged.
>
> call void @llvm.trap() #0
> ...
> attributes #0 = { noreturn nounwind "trap-func-name"="foo111" }
>
> Do you see a problem with this approach?
>
>
> 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/0567f162/attachment.html>


More information about the llvm-commits mailing list