diff --git a/bolt/lib/Core/HashUtilities.cpp b/bolt/lib/Core/HashUtilities.cpp index 88f01e4f936d30..6c7570dcc44e87 100644 --- a/bolt/lib/Core/HashUtilities.cpp +++ b/bolt/lib/Core/HashUtilities.cpp @@ -155,10 +155,7 @@ std::string hashBlockLoose(BinaryContext &BC, const BinaryBasicBlock &BB) { } std::string Mnemonic = BC.InstPrinter->getMnemonic(&Inst).first; - Mnemonic.erase( - std::remove_if(Mnemonic.begin(), Mnemonic.end(), - [](unsigned char ch) { return std::isspace(ch); }), - Mnemonic.end()); + llvm::erase_if(Mnemonic, [](unsigned char ch) { return std::isspace(ch); }); Opcodes.insert(Mnemonic); }