Rename *PendingImplicitInstantiations to *PendingInstantiations. No

functionality changed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112040 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chandler Carruth 2010-08-25 08:44:16 +00:00
Родитель 781472fe99
Коммит 62c78d54be
7 изменённых файлов: 44 добавлений и 48 удалений

Просмотреть файл

@ -3558,7 +3558,7 @@ public:
/// \brief The queue of implicit template instantiations that are required
/// but have not yet been performed.
std::deque<PendingImplicitInstantiation> PendingImplicitInstantiations;
std::deque<PendingImplicitInstantiation> PendingInstantiations;
/// \brief The queue of implicit template instantiations that are required
/// and must be performed within the current local scope.
@ -3569,7 +3569,7 @@ public:
/// types, static variables, enumerators, etc.
std::deque<PendingImplicitInstantiation> PendingLocalImplicitInstantiations;
void PerformPendingImplicitInstantiations(bool LocalOnly = false);
void PerformPendingInstantiations(bool LocalOnly = false);
TypeSourceInfo *SubstType(TypeSourceInfo *T,
const MultiLevelTemplateArgumentList &TemplateArgs,

Просмотреть файл

@ -472,7 +472,7 @@ private:
/// of the TU. It consists of a pair of values for every pending instantiation
/// where the first value is the ID of the decl and the second is the
/// instantiation location.
llvm::SmallVector<uint64_t, 64> PendingImplicitInstantiations;
llvm::SmallVector<uint64_t, 64> PendingInstantiations;
/// \brief The IDs of all dynamic class declarations in the chain.
///

Просмотреть файл

@ -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

Просмотреть файл

@ -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));
}
}

Просмотреть файл

@ -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();

Просмотреть файл

@ -1927,11 +1927,11 @@ ASTReader::ReadASTBlock(PerFileData &F) {
case PENDING_IMPLICIT_INSTANTIATIONS:
// Optimization for the first block.
if (PendingImplicitInstantiations.empty())
PendingImplicitInstantiations.swap(Record);
if (PendingInstantiations.empty())
PendingInstantiations.swap(Record);
else
PendingImplicitInstantiations.insert(
PendingImplicitInstantiations.end(), Record.begin(), Record.end());
PendingInstantiations.insert(PendingInstantiations.end(),
Record.begin(), Record.end());
break;
case SEMA_DECL_REFS:
@ -3430,12 +3430,11 @@ void ASTReader::InitializeSema(Sema &S) {
// If there were any pending implicit instantiations, deserialize them
// and add them to Sema's queue of such instantiations.
assert(PendingImplicitInstantiations.size() % 2 == 0 &&
"Expected pairs of entries");
for (unsigned Idx = 0, N = PendingImplicitInstantiations.size(); Idx < N;) {
ValueDecl *D=cast<ValueDecl>(GetDecl(PendingImplicitInstantiations[Idx++]));
SourceLocation Loc = ReadSourceLocation(PendingImplicitInstantiations, Idx);
SemaObj->PendingImplicitInstantiations.push_back(std::make_pair(D, Loc));
assert(PendingInstantiations.size() % 2 == 0 && "Expected pairs of entries");
for (unsigned Idx = 0, N = PendingInstantiations.size(); Idx < N;) {
ValueDecl *D=cast<ValueDecl>(GetDecl(PendingInstantiations[Idx++]));
SourceLocation Loc = ReadSourceLocation(PendingInstantiations, Idx);
SemaObj->PendingInstantiations.push_back(std::make_pair(D, Loc));
}
// Load the offsets of the declarations that Sema references.

Просмотреть файл

@ -2301,12 +2301,12 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, MemorizeStatCalls *StatCalls,
AddDeclRef(SemaRef.DynamicClasses[I], DynamicClasses);
// Build a record containing all of pending implicit instantiations.
RecordData PendingImplicitInstantiations;
RecordData PendingInstantiations;
for (std::deque<Sema::PendingImplicitInstantiation>::iterator
I = SemaRef.PendingImplicitInstantiations.begin(),
N = SemaRef.PendingImplicitInstantiations.end(); I != N; ++I) {
AddDeclRef(I->first, PendingImplicitInstantiations);
AddSourceLocation(I->second, PendingImplicitInstantiations);
I = SemaRef.PendingInstantiations.begin(),
N = SemaRef.PendingInstantiations.end(); I != N; ++I) {
AddDeclRef(I->first, PendingInstantiations);
AddSourceLocation(I->second, PendingInstantiations);
}
assert(SemaRef.PendingLocalImplicitInstantiations.empty() &&
"There are local ones at end of translation unit!");
@ -2404,9 +2404,8 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, MemorizeStatCalls *StatCalls,
Stream.EmitRecord(DYNAMIC_CLASSES, DynamicClasses);
// Write the record containing pending implicit instantiations.
if (!PendingImplicitInstantiations.empty())
Stream.EmitRecord(PENDING_IMPLICIT_INSTANTIATIONS,
PendingImplicitInstantiations);
if (!PendingInstantiations.empty())
Stream.EmitRecord(PENDING_IMPLICIT_INSTANTIATIONS, PendingInstantiations);
// Write the record containing declaration references of Sema.
if (!SemaDeclRefs.empty())
@ -2553,13 +2552,13 @@ void ASTWriter::WriteASTChain(Sema &SemaRef, MemorizeStatCalls *StatCalls,
AddDeclRef(SemaRef.DynamicClasses[I], DynamicClasses);
// Build a record containing all of pending implicit instantiations.
RecordData PendingImplicitInstantiations;
RecordData PendingInstantiations;
for (std::deque<Sema::PendingImplicitInstantiation>::iterator
I = SemaRef.PendingImplicitInstantiations.begin(),
N = SemaRef.PendingImplicitInstantiations.end(); I != N; ++I) {
I = SemaRef.PendingInstantiations.begin(),
N = SemaRef.PendingInstantiations.end(); I != N; ++I) {
if (I->first->getPCHLevel() == 0) {
AddDeclRef(I->first, PendingImplicitInstantiations);
AddSourceLocation(I->second, PendingImplicitInstantiations);
AddDeclRef(I->first, PendingInstantiations);
AddSourceLocation(I->second, PendingInstantiations);
}
}
assert(SemaRef.PendingLocalImplicitInstantiations.empty() &&
@ -2639,9 +2638,8 @@ void ASTWriter::WriteASTChain(Sema &SemaRef, MemorizeStatCalls *StatCalls,
Stream.EmitRecord(DYNAMIC_CLASSES, DynamicClasses);
// Write the record containing pending implicit instantiations.
if (!PendingImplicitInstantiations.empty())
Stream.EmitRecord(PENDING_IMPLICIT_INSTANTIATIONS,
PendingImplicitInstantiations);
if (!PendingInstantiations.empty())
Stream.EmitRecord(PENDING_IMPLICIT_INSTANTIATIONS, PendingInstantiations);
// Write the record containing declaration references of Sema.
if (!SemaDeclRefs.empty())