diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2010-08-25 08:44:16 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2010-08-25 08:44:16 +0000 |
commit | 62c78d54bee499dd87f768f48b21c9b5ec15e516 (patch) | |
tree | ad008abed42b4aa274b97453b9fcd789121ebeef /lib/Sema | |
parent | 781472fe99a120098c631b0cbe33c89f8cef5e70 (diff) |
Rename *PendingImplicitInstantiations to *PendingInstantiations. No
functionality changed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112040 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r-- | lib/Sema/Sema.cpp | 2 | ||||
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 5 | ||||
-rw-r--r-- | lib/Sema/SemaTemplateInstantiateDecl.cpp | 30 |
3 files changed, 18 insertions, 19 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index 2320d7dc32..6143492ea7 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -300,7 +300,7 @@ void Sema::ActOnEndOfTranslationUnit() { // common behavior for C++ compilers, it is technically wrong. In the // future, we either need to be able to filter the results of name lookup // or we need to perform template instantiations earlier. - PerformPendingImplicitInstantiations(); + PerformPendingInstantiations(); /// If DefinedUsedVTables ends up marking any virtual member /// functions it might lead to more pending template diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 5986eca373..197c44dfa4 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -7678,8 +7678,7 @@ void Sema::MarkDeclarationReferenced(SourceLocation Loc, Decl *D) { PendingLocalImplicitInstantiations.push_back(std::make_pair(Function, Loc)); else - PendingImplicitInstantiations.push_back(std::make_pair(Function, - Loc)); + PendingInstantiations.push_back(std::make_pair(Function, Loc)); } } @@ -7698,7 +7697,7 @@ void Sema::MarkDeclarationReferenced(SourceLocation Loc, Decl *D) { if (MSInfo->getPointOfInstantiation().isInvalid() && MSInfo->getTemplateSpecializationKind()== TSK_ImplicitInstantiation) { MSInfo->setPointOfInstantiation(Loc); - PendingImplicitInstantiations.push_back(std::make_pair(Var, Loc)); + PendingInstantiations.push_back(std::make_pair(Var, Loc)); } } diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index dd82114f2b..db216f3c56 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -2042,7 +2042,7 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, Function->setInvalidDecl(); } else if (Function->getTemplateSpecializationKind() == TSK_ExplicitInstantiationDefinition) { - PendingImplicitInstantiations.push_back( + PendingInstantiations.push_back( std::make_pair(Function, PointOfInstantiation)); } @@ -2065,9 +2065,9 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, // If we're performing recursive template instantiation, create our own // queue of pending implicit instantiations that we will instantiate later, // while we're still within our own instantiation context. - std::deque<PendingImplicitInstantiation> SavedPendingImplicitInstantiations; + std::deque<PendingImplicitInstantiation> SavedPendingInstantiations; if (Recursive) - PendingImplicitInstantiations.swap(SavedPendingImplicitInstantiations); + PendingInstantiations.swap(SavedPendingInstantiations); EnterExpressionEvaluationContext EvalContext(*this, Action::PotentiallyEvaluated); @@ -2126,16 +2126,16 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, // This class may have local implicit instantiations that need to be // instantiation within this scope. - PerformPendingImplicitInstantiations(/*LocalOnly=*/true); + PerformPendingInstantiations(/*LocalOnly=*/true); Scope.Exit(); if (Recursive) { // Instantiate any pending implicit instantiations found during the // instantiation of this template. - PerformPendingImplicitInstantiations(); + PerformPendingInstantiations(); // Restore the set of pending implicit instantiations. - PendingImplicitInstantiations.swap(SavedPendingImplicitInstantiations); + PendingInstantiations.swap(SavedPendingInstantiations); } } @@ -2182,7 +2182,7 @@ void Sema::InstantiateStaticDataMemberDefinition( Diag(Def->getLocation(), diag::note_explicit_instantiation_here); } else if (Var->getTemplateSpecializationKind() == TSK_ExplicitInstantiationDefinition) { - PendingImplicitInstantiations.push_back( + PendingInstantiations.push_back( std::make_pair(Var, PointOfInstantiation)); } @@ -2208,9 +2208,9 @@ void Sema::InstantiateStaticDataMemberDefinition( // If we're performing recursive template instantiation, create our own // queue of pending implicit instantiations that we will instantiate later, // while we're still within our own instantiation context. - std::deque<PendingImplicitInstantiation> SavedPendingImplicitInstantiations; + std::deque<PendingImplicitInstantiation> SavedPendingInstantiations; if (Recursive) - PendingImplicitInstantiations.swap(SavedPendingImplicitInstantiations); + PendingInstantiations.swap(SavedPendingInstantiations); // Enter the scope of this instantiation. We don't use // PushDeclContext because we don't have a scope. @@ -2234,10 +2234,10 @@ void Sema::InstantiateStaticDataMemberDefinition( if (Recursive) { // Instantiate any pending implicit instantiations found during the // instantiation of this template. - PerformPendingImplicitInstantiations(); + PerformPendingInstantiations(); // Restore the set of pending implicit instantiations. - PendingImplicitInstantiations.swap(SavedPendingImplicitInstantiations); + PendingInstantiations.swap(SavedPendingInstantiations); } } @@ -2703,14 +2703,14 @@ NamedDecl *Sema::FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D, /// \brief Performs template instantiation for all implicit template /// instantiations we have seen until this point. -void Sema::PerformPendingImplicitInstantiations(bool LocalOnly) { +void Sema::PerformPendingInstantiations(bool LocalOnly) { while (!PendingLocalImplicitInstantiations.empty() || - (!LocalOnly && !PendingImplicitInstantiations.empty())) { + (!LocalOnly && !PendingInstantiations.empty())) { PendingImplicitInstantiation Inst; if (PendingLocalImplicitInstantiations.empty()) { - Inst = PendingImplicitInstantiations.front(); - PendingImplicitInstantiations.pop_front(); + Inst = PendingInstantiations.front(); + PendingInstantiations.pop_front(); } else { Inst = PendingLocalImplicitInstantiations.front(); PendingLocalImplicitInstantiations.pop_front(); |