diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-07-28 19:49:54 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-07-28 19:49:54 +0000 |
commit | e39f97c86906b2e5d480e9b84fb20f45f209dea9 (patch) | |
tree | 32c217e534c5c9334006bc53b229aeb7be9aaaaf /clang/lib/Sema | |
parent | cf2996dc221c2c4371879b3413489e7f3c94544e (diff) | |
download | bcm5719-llvm-e39f97c86906b2e5d480e9b84fb20f45f209dea9.tar.gz bcm5719-llvm-e39f97c86906b2e5d480e9b84fb20f45f209dea9.zip |
Make the deserialization of Sema::PendingInstantiations lazy. At this
point, ASTReader::InitializeSema() has very little interesting work,
*except* issues stemming from preloaded declarations. That's something
we'll still need to cope with.
llvm-svn: 136378
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r-- | clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index 41818d329c2..872bb874571 100644 --- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -3229,6 +3229,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::PerformPendingInstantiations(bool LocalOnly) { + // Load pending instantiations from the external source. + if (!LocalOnly && ExternalSource) { + SmallVector<std::pair<ValueDecl *, SourceLocation>, 4> Pending; + ExternalSource->ReadPendingInstantiations(Pending); + PendingInstantiations.insert(PendingInstantiations.begin(), + Pending.begin(), Pending.end()); + } + while (!PendingLocalImplicitInstantiations.empty() || (!LocalOnly && !PendingInstantiations.empty())) { PendingImplicitInstantiation Inst; |