[llvm] r340274 - [llvm-mca] Replace use of llvm::any_of with std::any_of.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 27 16:25:10 PDT 2018


What was the problem with llvm::any_of?

On Tue, Aug 21, 2018 at 6:01 AM Andrea Di Biagio via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: adibiagio
> Date: Tue Aug 21 06:00:44 2018
> New Revision: 340274
>
> URL: http://llvm.org/viewvc/llvm-project?rev=340274&view=rev
> Log:
> [llvm-mca] Replace use of llvm::any_of with std::any_of.
>
> This should unbreak the buildbots.
>
> Modified:
>     llvm/trunk/tools/llvm-mca/Instruction.h
>
> Modified: llvm/trunk/tools/llvm-mca/Instruction.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Instruction.h?rev=340274&r1=340273&r2=340274&view=diff
>
> ==============================================================================
> --- llvm/trunk/tools/llvm-mca/Instruction.h (original)
> +++ llvm/trunk/tools/llvm-mca/Instruction.h Tue Aug 21 06:00:44 2018
> @@ -339,8 +339,9 @@ public:
>    int getCyclesLeft() const { return CyclesLeft; }
>
>    bool hasDependentUsers() const {
> -    return llvm::any_of(
> -        Defs, [](const UniqueDef &Def) { return Def->getNumUsers() > 0;
> });
> +    return std::any_of(Defs.begin(), Defs.end(), [](const UniqueDef &Def)
> {
> +      return Def->getNumUsers() > 0;
> +    });
>    }
>
>    bool isDependencyBreaking() const { return IsDepBreaking; }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180827/9f90ba1a/attachment.html>


More information about the llvm-commits mailing list