summaryrefslogtreecommitdiffstats
path: root/llvm/utils
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils')
-rw-r--r--llvm/utils/TableGen/AsmMatcherEmitter.cpp19
-rw-r--r--llvm/utils/TableGen/CodeGenSchedule.cpp8
2 files changed, 11 insertions, 16 deletions
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
index 663d7d8ab42..6f7fd2bca85 100644
--- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
@@ -556,20 +556,17 @@ struct MatchableInfo {
/// findAsmOperand - Find the AsmOperand with the specified name and
/// suboperand index.
int findAsmOperand(StringRef N, int SubOpIdx) const {
- auto I = std::find_if(AsmOperands.begin(), AsmOperands.end(),
- [&](const AsmOperand &Op) {
- return Op.SrcOpName == N && Op.SubOpIdx == SubOpIdx;
- });
+ auto I = find_if(AsmOperands, [&](const AsmOperand &Op) {
+ return Op.SrcOpName == N && Op.SubOpIdx == SubOpIdx;
+ });
return (I != AsmOperands.end()) ? I - AsmOperands.begin() : -1;
}
/// findAsmOperandNamed - Find the first AsmOperand with the specified name.
/// This does not check the suboperand index.
int findAsmOperandNamed(StringRef N) const {
- auto I = std::find_if(AsmOperands.begin(), AsmOperands.end(),
- [&](const AsmOperand &Op) {
- return Op.SrcOpName == N;
- });
+ auto I = find_if(AsmOperands,
+ [&](const AsmOperand &Op) { return Op.SrcOpName == N; });
return (I != AsmOperands.end()) ? I - AsmOperands.begin() : -1;
}
@@ -774,9 +771,9 @@ public:
}
bool hasOptionalOperands() const {
- return std::find_if(Classes.begin(), Classes.end(),
- [](const ClassInfo& Class){ return Class.IsOptional; })
- != Classes.end();
+ return find_if(Classes, [](const ClassInfo &Class) {
+ return Class.IsOptional;
+ }) != Classes.end();
}
};
diff --git a/llvm/utils/TableGen/CodeGenSchedule.cpp b/llvm/utils/TableGen/CodeGenSchedule.cpp
index d2d7bd83831..d6b5e0a90eb 100644
--- a/llvm/utils/TableGen/CodeGenSchedule.cpp
+++ b/llvm/utils/TableGen/CodeGenSchedule.cpp
@@ -1570,11 +1570,9 @@ void CodeGenSchedModels::checkCompleteness() {
continue;
const RecVec &InstRWs = SC.InstRWs;
- auto I = std::find_if(InstRWs.begin(), InstRWs.end(),
- [&ProcModel] (const Record *R) {
- return R->getValueAsDef("SchedModel") ==
- ProcModel.ModelDef;
- });
+ auto I = find_if(InstRWs, [&ProcModel](const Record *R) {
+ return R->getValueAsDef("SchedModel") == ProcModel.ModelDef;
+ });
if (I == InstRWs.end()) {
PrintError("'" + ProcModel.ModelName + "' lacks information for '" +
Inst->TheDef->getName() + "'");
OpenPOWER on IntegriCloud