[llvm] Add the 'initialized' attribute langref and support (PR #84803)

Jan Voung via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 17:29:00 PDT 2024


================
@@ -226,6 +236,10 @@ class Attribute {
   /// attribute to be a ConstantRange attribute.
   ConstantRange getValueAsConstantRange() const;
 
+  /// Return the attribute's value as a const range list. This requires the
+  /// attribute to be a const range list attribute.
+  SmallVector<std::pair<int64_t, int64_t>, 16> getValueAsRanges() const;
----------------
jvoung wrote:

Is it possible to return an ArrayRef instead of a copy? Will the underlying storage lifetime work out?

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


More information about the llvm-commits mailing list