diff --git a/llvm/include/llvm/TableGen/DirectiveEmitter.h b/llvm/include/llvm/TableGen/DirectiveEmitter.h index b856bb77f7b74..4b21ad6342b59 100644 --- a/llvm/include/llvm/TableGen/DirectiveEmitter.h +++ b/llvm/include/llvm/TableGen/DirectiveEmitter.h @@ -211,7 +211,7 @@ class Clause : public BaseRecord { StringRef Name = Def->getValueAsString("name"); std::string N = Name.str(); bool Cap = true; - std::transform(N.begin(), N.end(), N.begin(), [&Cap](unsigned char C) { + llvm::transform(N, N.begin(), [&Cap](unsigned char C) { if (Cap == true) { C = toUpper(C); Cap = false; diff --git a/llvm/lib/DebugInfo/LogicalView/Core/LVSupport.cpp b/llvm/lib/DebugInfo/LogicalView/Core/LVSupport.cpp index da6ba8dfd483b..d22b136632148 100644 --- a/llvm/lib/DebugInfo/LogicalView/Core/LVSupport.cpp +++ b/llvm/lib/DebugInfo/LogicalView/Core/LVSupport.cpp @@ -30,7 +30,7 @@ LVStringPool &llvm::logicalview::getStringPool() { return StringPool; } // - '//' into '/' std::string llvm::logicalview::transformPath(StringRef Path) { std::string Name(Path); - std::transform(Name.begin(), Name.end(), Name.begin(), tolower); + llvm::transform(Name, Name.begin(), tolower); llvm::replace(Name, '\\', '/'); // Remove all duplicate slashes. @@ -47,7 +47,7 @@ std::string llvm::logicalview::transformPath(StringRef Path) { // '/', '\', '<', '>', '.', ':', '%', '*', '?', '|', '"', ' '. std::string llvm::logicalview::flattenedFilePath(StringRef Path) { std::string Name(Path); - std::transform(Name.begin(), Name.end(), Name.begin(), tolower); + llvm::transform(Name, Name.begin(), tolower); const char *CharSet = "/\\<>.:%*?|\" "; char *Input = Name.data(); diff --git a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp index 875b505549f0a..5552cea78694d 100644 --- a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp +++ b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp @@ -1018,7 +1018,7 @@ bool AArch64InstPrinter::printSysAlias(const MCInst *MI, return false; std::string Str = Ins + Name; - std::transform(Str.begin(), Str.end(), Str.begin(), ::tolower); + llvm::transform(Str, Str.begin(), ::tolower); O << '\t' << Str; if (NeedsReg) { @@ -1077,7 +1077,7 @@ bool AArch64InstPrinter::printSyspAlias(const MCInst *MI, return false; std::string Str = Ins + Name; - std::transform(Str.begin(), Str.end(), Str.begin(), ::tolower); + llvm::transform(Str, Str.begin(), ::tolower); O << '\t' << Str; O << ", "; diff --git a/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp b/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp index 68b24dbe9f006..c0729cb4f3e9b 100644 --- a/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp +++ b/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp @@ -126,8 +126,8 @@ SmallVector WebAssemblyAsmTypeCheck::valTypesToStackTypes( ArrayRef ValTypes) { SmallVector Types(ValTypes.size()); - std::transform(ValTypes.begin(), ValTypes.end(), Types.begin(), - [](wasm::ValType Val) -> StackType { return Val; }); + llvm::transform(ValTypes, Types.begin(), + [](wasm::ValType Val) -> StackType { return Val; }); return Types; } diff --git a/llvm/lib/Transforms/Scalar/NewGVN.cpp b/llvm/lib/Transforms/Scalar/NewGVN.cpp index d06796660c444..d5fbbf0c10011 100644 --- a/llvm/lib/Transforms/Scalar/NewGVN.cpp +++ b/llvm/lib/Transforms/Scalar/NewGVN.cpp @@ -1074,10 +1074,9 @@ PHIExpression *NewGVN::createPHIExpression(ArrayRef PHIOperands, HasBackedge = HasBackedge || isBackedge(BB, PHIBlock); return lookupOperandLeader(P.first) != I; }); - std::transform(Filtered.begin(), Filtered.end(), op_inserter(E), - [&](const ValPair &P) -> Value * { - return lookupOperandLeader(P.first); - }); + llvm::transform(Filtered, op_inserter(E), [&](const ValPair &P) -> Value * { + return lookupOperandLeader(P.first); + }); return E; }