From 5b6b72f53ad164497cf62484b60cdbb4361f1978 Mon Sep 17 00:00:00 2001 From: Steve Naroff Date: Fri, 28 Sep 2007 23:39:26 +0000 Subject: Add some comments to MultiKeywordSelector, make all methods private, add a friend, move some methods around. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42456 91177308-0d34-0410-b5e6-96231b3b80d8 --- Lex/IdentifierTable.cpp | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'Lex') diff --git a/Lex/IdentifierTable.cpp b/Lex/IdentifierTable.cpp index 9a03d3f72d..a5ba4d412a 100644 --- a/Lex/IdentifierTable.cpp +++ b/Lex/IdentifierTable.cpp @@ -33,36 +33,6 @@ tok::ObjCKeywordKind Token::getObjCKeywordID() const { return specId ? specId->getObjCKeywordID() : tok::objc_not_keyword; } -char *MultiKeywordSelector::getName(llvm::SmallVectorImpl &methodName) { - methodName[0] = '\0'; - keyword_iterator KeyIter = keyword_begin(); - for (unsigned int i = 0; i < NumArgs; i++) { - if (KeyIter[i]) { - unsigned KeyLen = strlen(KeyIter[i]->getName()); - methodName.append(KeyIter[i]->getName(), KeyIter[i]->getName()+KeyLen); - } - methodName.push_back(':'); - } - methodName.push_back('\0'); - return &methodName[0]; -} - -char *Selector::getName(llvm::SmallVectorImpl &methodName) { - methodName[0] = '\0'; - IdentifierInfo *II = getAsIdentifierInfo(); - if (II) { - unsigned NameLen = strlen(II->getName()); - methodName.append(II->getName(), II->getName()+NameLen); - if (getNumArgs() == 1) - methodName.push_back(':'); - methodName.push_back('\0'); - } else { // We have a multiple keyword selector (no embedded flags). - MultiKeywordSelector *SI = reinterpret_cast(InfoPtr); - SI->getName(methodName); - } - return &methodName[0]; -} - //===----------------------------------------------------------------------===// // IdentifierInfo Implementation //===----------------------------------------------------------------------===// -- cgit v1.2.3-18-g5258