[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:01 PDT 2024
================
@@ -2044,6 +2052,19 @@ void Verifier::verifyParameterAttrs(AttributeSet Attrs, Type *Ty,
Check(Ty->isIntOrIntVectorTy(CR.getBitWidth()),
"Range bit width must match type bit width!", V);
}
+ if (Attrs.hasAttribute(Attribute::Initialized)) {
+ auto Inits = Attrs.getAttribute(Attribute::Initialized).getValueAsRanges();
+ Check(!Inits.empty(), "Attribute 'initialized' does not support empty list",
+ V);
+
+ for (size_t i = 1; i < Inits.size(); i++) {
----------------
jvoung wrote:
perhaps check low < high for the same "i"?
https://github.com/llvm/llvm-project/pull/84803
More information about the llvm-commits
mailing list