[PATCH] D129565: [NFC][Metadata] Change MDNode::operands()'s return type from op_range to ArrayRef<MDOperand>

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 12 10:40:06 PDT 2022


dexonsmith added inline comments.


================
Comment at: llvm/include/llvm/IR/Metadata.h:1348
   TempMDTuple cloneImpl() const {
-    return getTemporary(getContext(), SmallVector<Metadata *, 4>(operands()));
   }
----------------
I’m surprised SmallVector doesn’t have a generic constructor from ArrayRef. I wonder if it should?

(why did the iterator_range work before, but ArrayRef doesn’t?)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129565



More information about the llvm-commits mailing list