summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/CommentLexer.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2012-08-31 02:21:44 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2012-08-31 02:21:44 +0000
commit3ca956f7152f7d19b9e110119ac35ba3de086726 (patch)
tree825abce90efe5e577eac006d670c207af3069515 /clang/lib/AST/CommentLexer.cpp
parentd3bda3c5b9b28ac156a731c26e790d27faf3a338 (diff)
downloadbcm5719-llvm-3ca956f7152f7d19b9e110119ac35ba3de086726.tar.gz
bcm5719-llvm-3ca956f7152f7d19b9e110119ac35ba3de086726.zip
Comment HTML tag name machers: move from StringSwitch to an efficient
TableGen-generated string matcher. llvm-svn: 162969
Diffstat (limited to 'clang/lib/AST/CommentLexer.cpp')
-rw-r--r--clang/lib/AST/CommentLexer.cpp28
1 files changed, 2 insertions, 26 deletions
diff --git a/clang/lib/AST/CommentLexer.cpp b/clang/lib/AST/CommentLexer.cpp
index 870db2be5f9..eb0ac2472ad 100644
--- a/clang/lib/AST/CommentLexer.cpp
+++ b/clang/lib/AST/CommentLexer.cpp
@@ -29,32 +29,8 @@ bool isHTMLHexCharacterReferenceCharacter(char C) {
(C >= 'A' && C <= 'F');
}
-bool isHTMLTagName(StringRef Name) {
- return llvm::StringSwitch<bool>(Name)
- .Cases("em", "strong", true)
- .Cases("tt", "i", "b", "big", "small", true)
- .Cases("strike", "s", "u", "font", true)
- .Case("a", true)
- .Case("hr", true)
- .Cases("div", "span", true)
- .Cases("h1", "h2", "h3", true)
- .Cases("h4", "h5", "h6", true)
- .Case("code", true)
- .Case("blockquote", true)
- .Cases("sub", "sup", true)
- .Case("img", true)
- .Case("p", true)
- .Case("br", true)
- .Case("pre", true)
- .Cases("ins", "del", true)
- .Cases("ul", "ol", "li", true)
- .Cases("dl", "dt", "dd", true)
- .Cases("table", "caption", true)
- .Cases("thead", "tfoot", "tbody", true)
- .Cases("colgroup", "col", true)
- .Cases("tr", "th", "td", true)
- .Default(false);
-}
+#include "clang/AST/CommentHTMLTags.inc"
+
} // unnamed namespace
StringRef Lexer::resolveHTMLNamedCharacterReference(StringRef Name) const {
OpenPOWER on IntegriCloud