<div dir="ltr">I think that'll cause problems when we merge translation units at module link time? i.e. we only have one llvm.trap intrinsic.<div><br></div><div>-eric</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jun 30, 2015 at 12:30 PM Akira Hatanaka <<a href="mailto:ahatanak@gmail.com">ahatanak@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks.<br>
<br>
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.<br>
<br>
call void @llvm.trap() #0<br>
...<br>
attributes #0 = { noreturn nounwind "trap-func-name"="foo111" }<br>
<br>
Do you see a problem with this approach?<br>
<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10832&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Nfj7UcS5LRpiL4hUXnkumVwbxUhFkC_u2FNHdvcHvGA&s=gLWg8crzM3bSXWfDGzXLc8RyrTZsImYPIdVnTCWEx9Q&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D10832</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_settings_panel_emailpreferences_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Nfj7UcS5LRpiL4hUXnkumVwbxUhFkC_u2FNHdvcHvGA&s=rIBqnlyX3Tz4NVOJ4vp0WIO8e9-8Riiy3CtsAGMhP7U&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</blockquote></div>