diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-03-24 06:36:48 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-03-24 06:36:48 +0000 |
commit | c2bb81860b99e572477fab761ec4246933db29dd (patch) | |
tree | ac8b9c98fc73764801ec794b07228ffbc4d31c3b /clang/lib/Frontend/ChainedIncludesSource.cpp | |
parent | 20f3da11e8760c994a0c9db9cab08f7442937201 (diff) | |
download | bcm5719-llvm-c2bb81860b99e572477fab761ec4246933db29dd.tar.gz bcm5719-llvm-c2bb81860b99e572477fab761ec4246933db29dd.zip |
[modules] Deserialize CXXCtorInitializer list for a constructor lazily.
Previously we'd deserialize the list of mem-initializers for a constructor when
we deserialized the declaration of the constructor. That could trigger a
significant amount of unnecessary work (pulling in all base classes
recursively, for a start) and was causing problems for the modules buildbot due
to cyclic deserializations. We now deserialize these on demand.
This creates a certain amount of duplication with the handling of
CXXBaseSpecifiers; I'll look into reducing that next.
llvm-svn: 233052
Diffstat (limited to 'clang/lib/Frontend/ChainedIncludesSource.cpp')
-rw-r--r-- | clang/lib/Frontend/ChainedIncludesSource.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Frontend/ChainedIncludesSource.cpp b/clang/lib/Frontend/ChainedIncludesSource.cpp index cb260b4f4c6..be99b78295d 100644 --- a/clang/lib/Frontend/ChainedIncludesSource.cpp +++ b/clang/lib/Frontend/ChainedIncludesSource.cpp @@ -43,6 +43,7 @@ protected: Selector GetExternalSelector(uint32_t ID) override; uint32_t GetNumExternalSelectors() override; Stmt *GetExternalDeclStmt(uint64_t Offset) override; + CXXCtorInitializer **GetExternalCXXCtorInitializers(uint64_t Offset) override; CXXBaseSpecifier *GetExternalCXXBaseSpecifiers(uint64_t Offset) override; bool FindExternalVisibleDeclsByName(const DeclContext *DC, DeclarationName Name) override; @@ -232,6 +233,10 @@ CXXBaseSpecifier * ChainedIncludesSource::GetExternalCXXBaseSpecifiers(uint64_t Offset) { return getFinalReader().GetExternalCXXBaseSpecifiers(Offset); } +CXXCtorInitializer ** +ChainedIncludesSource::GetExternalCXXCtorInitializers(uint64_t Offset) { + return getFinalReader().GetExternalCXXCtorInitializers(Offset); +} bool ChainedIncludesSource::FindExternalVisibleDeclsByName(const DeclContext *DC, DeclarationName Name) { |