diff --git a/llvm/tools/llvm-mca/include/Instruction.h b/llvm/tools/llvm-mca/include/Instruction.h index 454992c4b9b0..ef1e9d65cb99 100644 --- a/llvm/tools/llvm-mca/include/Instruction.h +++ b/llvm/tools/llvm-mca/include/Instruction.h @@ -16,6 +16,7 @@ #ifndef LLVM_TOOLS_LLVM_MCA_INSTRUCTION_H #define LLVM_TOOLS_LLVM_MCA_INSTRUCTION_H +#include "llvm/ADT/STLExtras.h" #include "llvm/Support/MathExtras.h" #ifndef NDEBUG @@ -339,7 +340,7 @@ public: int getCyclesLeft() const { return CyclesLeft; } bool hasDependentUsers() const { - return std::any_of(Defs.begin(), Defs.end(), [](const UniqueDef &Def) { + return llvm::any_of(Defs, [](const UniqueDef &Def) { return Def->getNumUsers() > 0; }); }