зеркало из https://github.com/microsoft/clang-1.git
Small code change to improve performance
in my last patch, suggested by Argyrios. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173182 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
48f3cc2b2b
Коммит
3548068c22
|
@ -575,6 +575,9 @@ public:
|
|||
/// \brief id<NSCopying> type.
|
||||
QualType QIDNSCopying;
|
||||
|
||||
/// \brief will hold 'respondsToSelector:'
|
||||
Selector RespondsToSelectorSel;
|
||||
|
||||
/// A flag to remember whether the implicit forms of operator new and delete
|
||||
/// have been declared.
|
||||
bool GlobalNewDeleteDeclared;
|
||||
|
|
|
@ -2485,8 +2485,12 @@ ExprResult Sema::ActOnInstanceMessage(Scope *S,
|
|||
MultiExprArg Args) {
|
||||
if (!Receiver)
|
||||
return ExprError();
|
||||
IdentifierInfo *SelectorId = &Context.Idents.get("respondsToSelector");
|
||||
if (Sel == Context.Selectors.getUnarySelector(SelectorId))
|
||||
|
||||
if (RespondsToSelectorSel.isNull()) {
|
||||
IdentifierInfo *SelectorId = &Context.Idents.get("respondsToSelector");
|
||||
RespondsToSelectorSel = Context.Selectors.getUnarySelector(SelectorId);
|
||||
}
|
||||
if (Sel == RespondsToSelectorSel)
|
||||
RemoveSelectorFromWarningCache(*this, Args[0]);
|
||||
|
||||
return BuildInstanceMessage(Receiver, Receiver->getType(),
|
||||
|
|
Загрузка…
Ссылка в новой задаче