[llvm] Add the 'initialized' attribute langref and support (PR #84803)
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 15 12:55:11 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;
----------------
aeubanks wrote:
we should use `ConstantRange` instead of `std::pair`, especially since it already has intersection/union methods
https://github.com/llvm/llvm-project/pull/84803
More information about the llvm-commits
mailing list