================
@@ -1553,6 +1553,28 @@ class MDTuple : public MDNode {
   /// Shrink the operands by 1.
   void pop_back() { resize(getNumOperands() - 1); }
 
+  /// Filter out tuple elements that satisfy predicate.
+  /// Return this if no elements should be filtered out (without re-uniquing).
+  template <typename T> MDTuple *filter(T &&RemovePred) {
----------------
chbessonova wrote:

The predicate usually carries what elements to retain, see 
https://llvm.org/doxygen/classllvm_1_1filter__iterator__base.html

The logic of the function can be simplified with filtering iterator or 
filtering range use.

https://github.com/llvm/llvm-project/pull/187927
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to