Lines Matching defs:Spelling
57 explicit FlattenedSpelling(const Record &Spelling)
58 : V(std::string(Spelling.getValueAsString("Variety"))),
59 N(std::string(Spelling.getValueAsString("Name"))) {
61 "Given a GCC spelling, which means this hasn't been flattened!");
63 NS = std::string(Spelling.getValueAsString("Namespace"));
79 for (const auto &Spelling : Spellings) {
80 StringRef Variety = Spelling->getValueAsString("Variety");
81 StringRef Name = Spelling->getValueAsString("Name");
85 if (Spelling->getValueAsBit("AllowInC"))
90 if (Spelling->getValueAsBit("AllowInC"))
93 Ret.push_back(FlattenedSpelling(*Spelling));
154 // Normalize the spelling of a GNU attribute (i.e. "x" in "__attribute__((x))"),
1397 OS << " return \"(No spelling)\";\n}\n\n";
1403 " llvm_unreachable(\"Unknown attribute spelling!\");\n"
1404 " return \"(No spelling)\";\n";
1433 << " llvm_unreachable(\"Unknown attribute spelling!\");\n"
1439 // The actual spelling of the name and namespace (if applicable)
1441 llvm::SmallString<64> Spelling;
1453 Spelling += Namespace;
1454 Spelling += "::";
1470 Spelling += Namespace;
1471 Spelling += " ";
1477 Spelling += Name;
1480 << " OS << \"" << Prefix << Spelling << "\";\n";
1490 if (Spelling == "availability") {
1494 } else if (Spelling == "deprecated" || Spelling == "gnu::deprecated") {
1551 /// Return the index of a spelling in a spelling list.
1554 const FlattenedSpelling &Spelling) {
1555 assert(!SpellingList.empty() && "Spelling list is empty!");
1559 if (S.variety() != Spelling.variety())
1561 if (S.nameSpace() != Spelling.nameSpace())
1563 if (S.name() != Spelling.name())
1569 llvm_unreachable("Unknown spelling!");
1579 "Attribute with empty spelling list can't have accessors!");
1601 for (const auto &Spelling :
1604 std::string(NormalizeNameForSpellingComparison(Spelling.name()));
1616 // namespace (if present) and name for each attribute spelling. However,
1619 std::string Ret(" enum Spelling {\n");
1632 const std::string &Spelling = S.name();
1640 EnumName += NormalizeNameForSpellingComparison(Spelling);
1642 // Even if the name is not unique, this spelling index corresponds to a
1649 // semantic spelling, and can be elided.
1656 // Duplicate spellings are not considered part of the semantic spelling
1657 // enumeration, but the spelling index and semantic spelling values are
1671 << "llvm_unreachable(\"Unknown spelling list index\");\n";
1928 OS << "#define ATTR_MATCH_SUB_RULE(Value, Spelling, IsAbstract, Parent, "
1930 << "ATTR_MATCH_RULE(Value, Spelling, IsAbstract)\n";
1959 // An attribute has no GNU/CXX11 spelling
2344 // If there are zero or one spellings, all spelling-related functionality
2345 // can be elided. If all of the spellings share the same name, the spelling
2350 // This maps spelling index values to semantic Spelling enumerants.
2428 OS << ", " << R.getName() << "Attr::Spelling S";
2430 OS << " = static_cast<Spelling>(SpellingNotCalculated)";
2561 OS << " Spelling getSemanticSpelling() const;\n";
2563 OS << R.getName() << "Attr::Spelling " << R.getName()
2676 // Determines if an attribute has a Pragma spelling.
3090 for (const auto &Spelling : Spellings) {
3091 if (Spelling->getValueAsString("Variety") == Variety) {
3092 Version = static_cast<int>(Spelling->getValueAsInt("Version"));
3094 PrintError(Spelling->getLoc(), "Standard attributes must have "
3141 // spelling variety.
3175 auto fn = [&OS](const char *Spelling, const char *Variety,
3187 GenerateHasAttrSpellingStringSwitch(I->second, OS, Spelling, I->first);
3440 "Could not determine diagnostic spelling for the node: " +
3830 // such as target-specific attributes with a shared spelling, collapse the
3952 OS << "static constexpr ParsedAttrInfo::Spelling " << I->first
3956 std::string Spelling;
3958 Spelling += S.nameSpace() + "::";
3960 Spelling += NormalizeGNUAttrSpelling(RawSpelling);
3962 Spelling += RawSpelling;
3964 OS << ", \"" << Spelling << "\"},\n";
4073 std::string Spelling;
4078 Spelling += S.nameSpace() + "::";
4082 Spelling += S.nameSpace() + "::";
4094 assert(Matches && "Unsupported spelling variety found");
4097 Spelling += NormalizeGNUAttrSpelling(RawSpelling);
4099 Spelling += RawSpelling;
4103 Spelling, "return AttributeCommonInfo::AT_" + AttrName + ";"));
4106 Spelling, "return AttributeCommonInfo::IgnoredAttribute;"));
4144 // by whether there is a Spelling enumeration for it), then write out the
4145 // spelling used for the attribute.
4232 void add(const Record &Attr, FlattenedSpelling Spelling) {
4233 SpellingKind Kind = StringSwitch<SpellingKind>(Spelling.variety())
4242 if (!Spelling.nameSpace().empty()) {
4246 Name = Spelling.nameSpace() + "::";
4249 Name = Spelling.nameSpace() + " ";
4252 PrintFatalError(Attr.getLoc(), "Unexpected namespace in spelling");
4255 Name += Spelling.name();
4291 // FIXME: there is no way to have a per-spelling category for the attribute
4304 // If there's only one spelling, we can simply use that.
4311 std::string Spelling =
4313 Uniques.insert(Spelling);
4315 // If the semantic map has only one spelling, that is sufficient for our
4338 // List what spelling syntaxes the attribute supports.
4351 for (StringRef Spelling : Doc.SupportedSpellings[K]) {
4354 OS << "``" << Spelling << "``";