summaryrefslogtreecommitdiffstats
path: root/clang/utils
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-05-02 14:24:30 +0000
committerDouglas Gregor <dgregor@apple.com>2012-05-02 14:24:30 +0000
commitadfe5afe3898a638a437b54967c01b85beeeaa8e (patch)
tree616b7162cca520686243e9898e4eb604209e8f85 /clang/utils
parentae7188d9b9c055effa6e2952682dfe5c94c55b51 (diff)
downloadbcm5719-llvm-adfe5afe3898a638a437b54967c01b85beeeaa8e.tar.gz
bcm5719-llvm-adfe5afe3898a638a437b54967c01b85beeeaa8e.zip
Replace the StringSwitch in AttributeList::getKind(const
IdentifierInfo *) with a static StringMap, improving -fsyntax-only performance by 1% for the example in <rdar://problem/11004361>. llvm-svn: 155987
Diffstat (limited to 'clang/utils')
-rw-r--r--clang/utils/TableGen/ClangAttrEmitter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp
index 7951fc467d2..6dc015acfb9 100644
--- a/clang/utils/TableGen/ClangAttrEmitter.cpp
+++ b/clang/utils/TableGen/ClangAttrEmitter.cpp
@@ -1083,7 +1083,8 @@ void ClangAttrParsedAttrKindsEmitter::run(raw_ostream &OS) {
AttrName = NormalizeAttrName(AttrName);
Spelling = NormalizeAttrSpelling(Spelling);
- OS << ".Case(\"" << Spelling << "\", " << "AT_" << AttrName << ")\n";
+ OS << "Result[\"" << Spelling << "\"] = " << "AttributeList::AT_"
+ << AttrName << ";\n";
}
}
}
OpenPOWER on IntegriCloud