[cfe-commits] [patch] Alternative fix for pr9614
İsmail Dönmez
ismail at namtrac.org
Wed Oct 26 13:52:27 PDT 2011
Hi;
2011/10/26 Rafael Ávila de Espíndola <rafael.espindola at gmail.com>
> > + // PR9614. Avoid cases where the source code is lying to us. An
> available
> > + // externally function should have an equivalent function somewhere
> else,
> > + // but a function that calls itself is clearly not equivalent to the
> real
> > + // implementation.
> > + if (isTriviallyRecursiveViaAsm(F))
> > + return false;
> > + if (F->hasAttr<AlwaysInlineAttr>())
> > + return true;
> > + if (CodeGenOpts.OptimizationLevel == 0)
> > + return false;
> > + return true;
> >
> > Please keep the CodeGenOpts.OptimizationLevel test first, and put the
> > isTriviallyRecursiveViaAsm test at the end.
>
> I did that, but it changes the meaning for always_inline functions. We
> can always revisit this if one is found in the wild.
>
Please merge this into 3.0 branch, thanks!
ismail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111026/5e65db29/attachment.html>
More information about the cfe-commits
mailing list