<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 8, 2014 at 12:32 PM, David Majnemer <span dir="ltr"><<a href="mailto:david.majnemer@gmail.com" target="_blank">david.majnemer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":8in" class="a3s" style="overflow:hidden">+    // It is unsafe to drop a function with discardable linkage from a COMDAT<br>
+    // without also dropping the other members of the COMDAT.<br>
+    // The inliner doesn't visit non-function entities which are in COMDAT<br>
+    // groups so it is unsafe to do so *unless* the linkage is local.<br>
+    if (!F->hasLocalLinkage() && F->hasComdat())<br>
+      continue;<br></div></blockquote></div><br>Rather than repeating this everywhere, please make a nice predicate with this documentation and call it everywhere. F->isDiscardable(), whatever.</div></div>