aboutsummaryrefslogtreecommitdiff
path: root/Lex/IdentifierTable.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-10-07 02:00:24 +0000
committerChris Lattner <sabre@nondot.org>2007-10-07 02:00:24 +0000
commitff38491c18b060526d754765b952f4a497a89416 (patch)
tree15862e2fe2f8322e83a71234bf32a73c86abaeef /Lex/IdentifierTable.cpp
parentf836e3fea2c77fdbb18170fb313ee0d45551320b (diff)
simplify the interfaces to create selectors: getSelector can take any
number of arguments now and does the right thing, but the nullary/unary accessors are preserved as convenience functions. This allows us to slightly simplify clients. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42716 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Lex/IdentifierTable.cpp')
-rw-r--r--Lex/IdentifierTable.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/Lex/IdentifierTable.cpp b/Lex/IdentifierTable.cpp
index aba3f9d1f2..fd64dec0ae 100644
--- a/Lex/IdentifierTable.cpp
+++ b/Lex/IdentifierTable.cpp
@@ -324,10 +324,9 @@ std::string Selector::getName() const {
}
-Selector SelectorTable::getKeywordSelector(unsigned nKeys,
- IdentifierInfo **IIV) {
- if (nKeys == 1)
- return Selector(IIV[0], 1);
+Selector SelectorTable::getSelector(unsigned nKeys, IdentifierInfo **IIV) {
+ if (nKeys < 2)
+ return Selector(IIV[0], nKeys);
llvm::FoldingSet<MultiKeywordSelector> *SelTab;
@@ -351,14 +350,6 @@ Selector SelectorTable::getKeywordSelector(unsigned nKeys,
return Selector(SI);
}
-Selector SelectorTable::getUnarySelector(IdentifierInfo *ID) {
- return Selector(ID, 1);
-}
-
-Selector SelectorTable::getNullarySelector(IdentifierInfo *ID) {
- return Selector(ID, 0);
-}
-
SelectorTable::SelectorTable() {
Impl = new llvm::FoldingSet<MultiKeywordSelector>;
}