/// Map from AttributeList index to the internal array index. Adding one happens
/// to work, because -1 wraps around to 0.
-static constexpr unsigned attrIdxToArrayIdx(unsigned Index) {
+static unsigned attrIdxToArrayIdx(unsigned Index) {
return Index + 1;
}
// Initialize AvailableFunctionAttrs and AvailableSomewhereAttrs
// summary bitsets.
- static_assert(attrIdxToArrayIdx(AttributeList::FunctionIndex) == 0U,
- "function should be stored in slot 0");
- for (const auto &I : Sets[0])
+ for (const auto &I : Sets[attrIdxToArrayIdx(AttributeList::FunctionIndex)])
if (!I.isStringAttribute())
AvailableFunctionAttrs.addAttribute(I.getKindAsEnum());