From: Adrian Prantl Date: Mon, 10 Jun 2013 21:36:55 +0000 (+0000) Subject: cleanup (address some more review comments for r183474): X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7044668ecb518496e463ea2dacae100d4badfd19;p=clang cleanup (address some more review comments for r183474): - reduce default buffer size to 64, which will still be large enough to hold any property names found in the wild. - get rid of the /*static*/ comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183697 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/IdentifierTable.h b/include/clang/Basic/IdentifierTable.h index b9c9ce7799..a195fc33d7 100644 --- a/include/clang/Basic/IdentifierTable.h +++ b/include/clang/Basic/IdentifierTable.h @@ -730,7 +730,7 @@ public: /// /// This is "set" + \p Name where the initial character of \p Name /// has been capitalized. - static SmallString<100> constructSetterName(StringRef Name); + static SmallString<64> constructSetterName(StringRef Name); /// \brief Return the default setter selector for the given identifier. /// diff --git a/lib/Basic/IdentifierTable.cpp b/lib/Basic/IdentifierTable.cpp index dc24f9aecf..b8ba4ba4d5 100644 --- a/lib/Basic/IdentifierTable.cpp +++ b/lib/Basic/IdentifierTable.cpp @@ -463,15 +463,15 @@ static SelectorTableImpl &getSelectorTableImpl(void *P) { return *static_cast(P); } -/*static*/ SmallString<100> +SmallString<64> SelectorTable::constructSetterName(StringRef Name) { - SmallString<100> SelectorName("set"); - SelectorName += Name; - SelectorName[3] = toUppercase(SelectorName[3]); - return SelectorName; + SmallString<64> SetterName("set"); + SetterName += Name; + SetterName[3] = toUppercase(SetterName[3]); + return SetterName; } -/*static*/ Selector +Selector SelectorTable::constructSetterSelector(IdentifierTable &Idents, SelectorTable &SelTable, const IdentifierInfo *Name) {