[PATCH] D142213: [MC] Make more use of MCInstrDesc::operands. NFC.

Sergei Barannikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 20 07:41:22 PST 2023


barannikov88 added inline comments.


================
Comment at: llvm/include/llvm/MC/MCInstrDesc.h:238
 
-  iterator_range<const_opInfo_iterator> operands() const {
-    return make_range(opInfo_begin(), opInfo_end());
+  ArrayRef<MCOperandInfo> operands() const {
+    return ArrayRef(OpInfo, NumOperands);
----------------
barannikov88 wrote:
> Why does it not return a canonical `iterator_range`?
Sorry, I got it. This is so that you can use `operands()[i]`.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142213/new/

https://reviews.llvm.org/D142213



More information about the llvm-commits mailing list