diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-01-14 16:38:05 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-01-14 16:38:05 +0000 |
commit | ef96ee0be5f100789f451641542a69cd719144d2 (patch) | |
tree | 657c479e4155abe55bc69e1313498d0d997377ae /lib/Sema/SemaTemplate.cpp | |
parent | 09dd3798e100ace40defdc5541277502346213f2 (diff) |
De-virtualize getPreviousDecl() and getMostRecentDecl() when we know
we have a redeclarable type, and only use the new virtual versions
(getPreviousDeclImpl() and getMostRecentDeclImpl()) when we don't have
that type information. This keeps us from penalizing users with strict
type information (and is the moral equivalent of a "final" method).
Plus, settle on the names getPreviousDecl() and getMostRecentDecl()
throughout.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148187 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index f190b31a0e..35022be1a3 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -6117,7 +6117,7 @@ Sema::ActOnExplicitInstantiation(Scope *S, // Verify that it is okay to explicitly instantiate here. CXXRecordDecl *PrevDecl - = cast_or_null<CXXRecordDecl>(Record->getPreviousDeclaration()); + = cast_or_null<CXXRecordDecl>(Record->getPreviousDecl()); if (!PrevDecl && Record->getDefinition()) PrevDecl = Record; if (PrevDecl) { @@ -6392,7 +6392,7 @@ DeclResult Sema::ActOnExplicitInstantiation(Scope *S, return true; } - FunctionDecl *PrevDecl = Specialization->getPreviousDeclaration(); + FunctionDecl *PrevDecl = Specialization->getPreviousDecl(); if (!PrevDecl && Specialization->isThisDeclarationADefinition()) PrevDecl = Specialization; |