mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-25 09:23:07 +00: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.
|
||||
unsigned getNumOperands() const {
|
||||
auto operands = record.getValueAsListOfDefs(fieldOperands);
|
||||
for (const llvm::Record *r : operands) {
|
||||
(void)r;
|
||||
assert(r->isSubClassOf("LLVMType") &&
|
||||
"expected operands to be of LLVM type");
|
||||
}
|
||||
assert(llvm::all_of(operands,
|
||||
[](const llvm::Record *r) {
|
||||
return r->isSubClassOf("LLVMType");
|
||||
}) &&
|
||||
"expected operands to be of LLVM type");
|
||||
return operands.size();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user