case MSInheritanceAttr::Keyword_multiple_inheritance: Code = '0'; break;
case MSInheritanceAttr::Keyword_virtual_inheritance: Code = 'F'; break;
case MSInheritanceAttr::Keyword_unspecified_inheritance: Code = 'G'; break;
+ case MSInheritanceAttr::SpellingNotCalculated:
+ llvm_unreachable("not reachable");
}
Out << '$' << Code;
case MSInheritanceAttr::Keyword_multiple_inheritance: Code = 'H'; break;
case MSInheritanceAttr::Keyword_virtual_inheritance: Code = 'I'; break;
case MSInheritanceAttr::Keyword_unspecified_inheritance: Code = 'J'; break;
+ case MSInheritanceAttr::SpellingNotCalculated:
+ llvm_unreachable("not reachable");
}
// If non-virtual, mangle the name. If virtual, mangle as a virtual memptr
break;
case MSInheritanceAttr::Keyword_unspecified_inheritance:
break;
+ case MSInheritanceAttr::SpellingNotCalculated:
+ llvm_unreachable("Spelling not yet calculated");
}
}
}
case OpenCLAccessAttr::Keyword_read_only: \
Result = Context.Id##ROTy; \
break; \
+ case OpenCLAccessAttr::SpellingNotCalculated: \
+ llvm_unreachable("Spelling not yet calculated"); \
} \
break;
#include "clang/Basic/OpenCLImageTypes.def"
std::string Ret(" enum Spelling {\n");
std::set<std::string> Uniques;
unsigned Idx = 0;
+
+ // If we have a need to have this many spellings we likely need to add an
+ // extra bit to the SpellingIndex in AttributeCommonInfo, then increase the
+ // value of SpellingNotCalculated there and here.
+ assert(Spellings.size() < 15 &&
+ "Too many spellings, would step on SpellingNotCalculated in "
+ "AttributeCommonInfo");
for (auto I = Spellings.begin(), E = Spellings.end(); I != E; ++I, ++Idx) {
const FlattenedSpelling &S = *I;
const std::string &Variety = S.variety();
// enumerator.
Ret += " " + EnumName + " = " + llvm::utostr(Idx);
}
+ Ret += ",\n SpellingNotCalculated = 15\n";
Ret += "\n };\n\n";
return Ret;
}