[mlir] Use all_of instead of a manual loop in IntrinsicGen. NFC

This was suggested in post-commit review of D72926.
This commit is contained in:
Alex Zinenko 2020-01-24 11:27:17 +01:00
parent 0298a87511
commit b901335193

View File

@ -117,11 +117,11 @@ public:
/// Get the number of operands. /// Get the number of operands.
unsigned getNumOperands() const { unsigned getNumOperands() const {
auto operands = record.getValueAsListOfDefs(fieldOperands); auto operands = record.getValueAsListOfDefs(fieldOperands);
for (const llvm::Record *r : operands) { assert(llvm::all_of(operands,
(void)r; [](const llvm::Record *r) {
assert(r->isSubClassOf("LLVMType") && return r->isSubClassOf("LLVMType");
"expected operands to be of LLVM type"); }) &&
} "expected operands to be of LLVM type");
return operands.size(); return operands.size();
} }