[cfe-commits] [patch] Alternative fix for pr9614

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Wed Oct 26 13:46:09 PDT 2011


> +  // 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.

...


Besides that, it seems okay to me.
>
> -Eli

Thanks,
Rafael



More information about the cfe-commits mailing list