aboutsummaryrefslogtreecommitdiff
path: root/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2014-11-24 09:15:30 +0000
committerDimitry Andric <dim@FreeBSD.org>2014-11-24 09:15:30 +0000
commit9f4dbff6669c8037f3b036bcf580d14f1a4f12a5 (patch)
tree47df2c12b57214af6c31e47404b005675b8b7ffc /utils/TableGen/ClangCommentHTMLTagsEmitter.cpp
parentf73d5f23a889b93d89ddef61ac0995df40286bb8 (diff)
downloadsrc-9f4dbff6669c8037f3b036bcf580d14f1a4f12a5.tar.gz
src-9f4dbff6669c8037f3b036bcf580d14f1a4f12a5.zip
Vendor import of clang RELEASE_350/final tag r216957 (effectively, 3.5.0 release):vendor/clang/clang-release_350-r216957
Notes
Notes: svn path=/vendor/clang/dist/; revision=274958 svn path=/vendor/clang/clang-release_350-r216957/; revision=274959; tag=vendor/clang/clang-release_350-r216957
Diffstat (limited to 'utils/TableGen/ClangCommentHTMLTagsEmitter.cpp')
-rw-r--r--utils/TableGen/ClangCommentHTMLTagsEmitter.cpp25
1 files changed, 10 insertions, 15 deletions
diff --git a/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp b/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp
index bfcd2cfd15a4..22c6226cfeb3 100644
--- a/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp
+++ b/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp
@@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//
+#include "TableGenBackends.h"
#include "llvm/TableGen/Record.h"
#include "llvm/TableGen/StringMatcher.h"
#include "llvm/TableGen/TableGenBackend.h"
@@ -19,14 +20,11 @@
using namespace llvm;
-namespace clang {
-void EmitClangCommentHTMLTags(RecordKeeper &Records, raw_ostream &OS) {
+void clang::EmitClangCommentHTMLTags(RecordKeeper &Records, raw_ostream &OS) {
std::vector<Record *> Tags = Records.getAllDerivedDefinitions("Tag");
std::vector<StringMatcher::StringPair> Matches;
- for (std::vector<Record *>::iterator I = Tags.begin(), E = Tags.end();
- I != E; ++I) {
- Record &Tag = **I;
- std::string Spelling = Tag.getValueAsString("Spelling");
+ for (Record *Tag : Tags) {
+ std::string Spelling = Tag->getValueAsString("Spelling");
Matches.push_back(StringMatcher::StringPair(Spelling, "return true;"));
}
@@ -38,19 +36,17 @@ void EmitClangCommentHTMLTags(RecordKeeper &Records, raw_ostream &OS) {
<< "}\n\n";
}
-void EmitClangCommentHTMLTagsProperties(RecordKeeper &Records,
- raw_ostream &OS) {
+void clang::EmitClangCommentHTMLTagsProperties(RecordKeeper &Records,
+ raw_ostream &OS) {
std::vector<Record *> Tags = Records.getAllDerivedDefinitions("Tag");
std::vector<StringMatcher::StringPair> MatchesEndTagOptional;
std::vector<StringMatcher::StringPair> MatchesEndTagForbidden;
- for (std::vector<Record *>::iterator I = Tags.begin(), E = Tags.end();
- I != E; ++I) {
- Record &Tag = **I;
- std::string Spelling = Tag.getValueAsString("Spelling");
+ for (Record *Tag : Tags) {
+ std::string Spelling = Tag->getValueAsString("Spelling");
StringMatcher::StringPair Match(Spelling, "return true;");
- if (Tag.getValueAsBit("EndTagOptional"))
+ if (Tag->getValueAsBit("EndTagOptional"))
MatchesEndTagOptional.push_back(Match);
- if (Tag.getValueAsBit("EndTagForbidden"))
+ if (Tag->getValueAsBit("EndTagForbidden"))
MatchesEndTagForbidden.push_back(Match);
}
@@ -66,5 +62,4 @@ void EmitClangCommentHTMLTagsProperties(RecordKeeper &Records,
OS << " return false;\n"
<< "}\n\n";
}
-} // end namespace clang