mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-18 19:15:51 -04:00
[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:
parent
0298a87511
commit
b901335193
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user