summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-02-17 16:18:32 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-02-17 16:18:32 +0000
commit8fae9d6cede86588bfbff604edc67e0e89cfef77 (patch)
tree36cfa55a379507ad82a73587ae72b5e7e4417a51 /utils
parent1b7ff4d0f83ed36abac34c04fce023697d90b836 (diff)
downloadclang-8fae9d6cede86588bfbff604edc67e0e89cfef77.tar.gz
clang-8fae9d6cede86588bfbff604edc67e0e89cfef77.tar.bz2
clang-8fae9d6cede86588bfbff604edc67e0e89cfef77.tar.xz
The default assignment operator could not be generated by all of the bots, but it's required by std::vector to operate properly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201518 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/ClangAttrEmitter.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/utils/TableGen/ClangAttrEmitter.cpp b/utils/TableGen/ClangAttrEmitter.cpp
index b88b2cb9e7..c6b12d7fc4 100644
--- a/utils/TableGen/ClangAttrEmitter.cpp
+++ b/utils/TableGen/ClangAttrEmitter.cpp
@@ -2645,13 +2645,13 @@ public:
};
DocCategory Category;
- const Record &Documentation;
- const Record &Attribute;
+ const Record *Documentation;
+ const Record *Attribute;
DocumentationData(DocCategory Category, const Record &Documentation,
const Record &Attribute)
- : Category(Category), Documentation(Documentation), Attribute(Attribute) {
- }
+ : Category(Category), Documentation(&Documentation),
+ Attribute(&Attribute) {}
};
static void WriteCategoryHeader(DocumentationData::DocCategory Category,
@@ -2690,10 +2690,10 @@ static void WriteDocumentation(const DocumentationData &Doc,
// documentation. This may not be a limiting factor since the spellings
// should generally be consistently applied across the category.
- std::vector<FlattenedSpelling> Spellings = GetFlattenedSpellings(Doc.Attribute);
+ std::vector<FlattenedSpelling> Spellings = GetFlattenedSpellings(*Doc.Attribute);
// Determine the heading to be used for this attribute.
- std::string Heading = Doc.Documentation.getValueAsString("Heading");
+ std::string Heading = Doc.Documentation->getValueAsString("Heading");
if (Heading.empty()) {
// If there's only one spelling, we can simply use that.
if (Spellings.size() == 1)
@@ -2714,7 +2714,7 @@ static void WriteDocumentation(const DocumentationData &Doc,
// If the heading is still empty, it is an error.
if (Heading.empty())
- PrintFatalError(Doc.Attribute.getLoc(),
+ PrintFatalError(Doc.Attribute->getLoc(),
"This attribute requires a heading to be specified");
// Gather a list of unique spellings; this is not the same as the semantic
@@ -2759,7 +2759,7 @@ static void WriteDocumentation(const DocumentationData &Doc,
OS << Heading << "\n" << std::string(Heading.length(), '-') << "\n";
if (!SupportedSpellings)
- PrintFatalError(Doc.Attribute.getLoc(),
+ PrintFatalError(Doc.Attribute->getLoc(),
"Attribute has no supported spellings; cannot be "
"documented");
@@ -2778,10 +2778,10 @@ static void WriteDocumentation(const DocumentationData &Doc,
// If the attribute is deprecated, print a message about it, and possibly
// provide a replacement attribute.
- if (!Doc.Documentation.isValueUnset("Deprecated")) {
+ if (!Doc.Documentation->isValueUnset("Deprecated")) {
OS << "This attribute has been deprecated, and may be removed in a future "
<< "version of Clang.";
- const Record &Deprecated = *Doc.Documentation.getValueAsDef("Deprecated");
+ const Record &Deprecated = *Doc.Documentation->getValueAsDef("Deprecated");
std::string Replacement = Deprecated.getValueAsString("Replacement");
if (!Replacement.empty())
OS << " This attribute has been superseded by ``"
@@ -2789,7 +2789,7 @@ static void WriteDocumentation(const DocumentationData &Doc,
OS << "\n\n";
}
- std::string ContentStr = Doc.Documentation.getValueAsString("Content");
+ std::string ContentStr = Doc.Documentation->getValueAsString("Content");
// Trim leading and trailing newlines and spaces.
StringRef Content(ContentStr);
while (Content.startswith("\r") || Content.startswith("\n") ||