[llvm] [IR][Attribute] Add support for intersecting AttributeLists; NFC (PR #109719)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 13:42:48 PDT 2024


================
@@ -775,6 +793,12 @@ class AttributeList {
   addAllocSizeParamAttr(LLVMContext &C, unsigned ArgNo, unsigned ElemSizeArg,
                         const std::optional<unsigned> &NumElemsArg);
 
+  /// Try to intersect this AttributeList with Other. Returns std::nullopt if
+  /// the two lists are inherently incompatible (imply different behavior, not
+  /// just analysis).
+  [[nodiscard]] std::optional<AttributeList>
+  intersectAttributes(LLVMContext &C, AttributeList Other) const;
----------------
goldsteinn wrote:

Personally at least, prefer non-matching function names for avoid confusion, but ill change.

https://github.com/llvm/llvm-project/pull/109719


More information about the llvm-commits mailing list