From 4903802fbfff23b27f0a030f6103818f6edb2a16 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 4 Feb 2012 13:45:25 +0000 Subject: Move a method from IdentifierTable.h out of line and remove the SmallString include. Fix all the transitive include users. llvm-svn: 149783 --- clang/lib/Basic/IdentifierTable.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'clang/lib/Basic/IdentifierTable.cpp') diff --git a/clang/lib/Basic/IdentifierTable.cpp b/clang/lib/Basic/IdentifierTable.cpp index a76a363912d..bc1f175b302 100644 --- a/clang/lib/Basic/IdentifierTable.cpp +++ b/clang/lib/Basic/IdentifierTable.cpp @@ -16,7 +16,7 @@ #include "clang/Basic/LangOptions.h" #include "llvm/ADT/FoldingSet.h" #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/StringRef.h" +#include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Support/ErrorHandling.h" @@ -454,6 +454,18 @@ static SelectorTableImpl &getSelectorTableImpl(void *P) { return *static_cast(P); } +/*static*/ Selector +SelectorTable::constructSetterName(IdentifierTable &Idents, + SelectorTable &SelTable, + const IdentifierInfo *Name) { + llvm::SmallString<100> SelectorName; + SelectorName = "set"; + SelectorName += Name->getName(); + SelectorName[3] = toupper(SelectorName[3]); + IdentifierInfo *SetterName = &Idents.get(SelectorName); + return SelTable.getUnarySelector(SetterName); +} + size_t SelectorTable::getTotalMemory() const { SelectorTableImpl &SelTabImpl = getSelectorTableImpl(Impl); return SelTabImpl.Allocator.getTotalMemory(); -- cgit v1.2.3