[llvm] af91e2b - [GlobalISel] Use std::initializer_list::size (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 11 12:19:47 PDT 2022
Author: Kazu Hirata
Date: 2022-09-11T12:19:37-07:00
New Revision: af91e2b9dba6a754e62862e14629af0d240d82bc
URL: https://github.com/llvm/llvm-project/commit/af91e2b9dba6a754e62862e14629af0d240d82bc
DIFF: https://github.com/llvm/llvm-project/commit/af91e2b9dba6a754e62862e14629af0d240d82bc.diff
LOG: [GlobalISel] Use std::initializer_list::size (NFC)
Added:
Modified:
llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
index 5caffe59ca436..3940210ad5f2b 100644
--- a/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
@@ -296,7 +296,7 @@ LegalizeRuleSet &LegalizerInfo::getActionDefinitionsBuilder(
std::initializer_list<unsigned> Opcodes) {
unsigned Representative = *Opcodes.begin();
- assert(!llvm::empty(Opcodes) && Opcodes.begin() + 1 != Opcodes.end() &&
+ assert(Opcodes.size() >= 2 &&
"Initializer list must have at least two opcodes");
for (unsigned Op : llvm::drop_begin(Opcodes))
More information about the llvm-commits
mailing list