diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-07-28 19:11:31 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-07-28 19:11:31 +0000 |
commit | dfe6543e12eca5c79421378b7fa6b3e8fc403e63 (patch) | |
tree | 082409087a592644bfdeb76f90d84e81dfff9a1e /include/clang/Sema/ExternalSemaSource.h | |
parent | 73cbbc8d786e54a7a61c2880ad1b9a596d235286 (diff) |
Lazily deserialize Sema::VTableUses. Plus, fix the utterly and
completely broken deserialization mapping code we had for VTableUses,
which would have broken horribly as soon as our local-to-global ID
mapping became interesting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136371 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema/ExternalSemaSource.h')
-rw-r--r-- | include/clang/Sema/ExternalSemaSource.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/clang/Sema/ExternalSemaSource.h b/include/clang/Sema/ExternalSemaSource.h index 41bc4e3536..00494641ba 100644 --- a/include/clang/Sema/ExternalSemaSource.h +++ b/include/clang/Sema/ExternalSemaSource.h @@ -29,6 +29,14 @@ class Sema; class TypedefNameDecl; class VarDecl; +/// \brief A simple structure that captures a vtable use for the purposes of +/// the \c ExternalSemaSource. +struct ExternalVTableUse { + CXXRecordDecl *Record; + SourceLocation Location; + bool DefinitionRequired; +}; + /// \brief An abstract interface that should be implemented by /// external AST sources that also provide information for semantic /// analysis. @@ -147,6 +155,13 @@ public: virtual void ReadWeakUndeclaredIdentifiers( SmallVectorImpl<std::pair<IdentifierInfo *, WeakInfo> > &WI) {} + /// \brief Read the set of used vtables known to the external Sema source. + /// + /// The external source should append its own used vtables to the given + /// vector. Note that this routine may be invoked multiple times; the external + /// source should take care not to introduce the same vtables repeatedly. + virtual void ReadUsedVTables(SmallVectorImpl<ExternalVTableUse> &VTables) {} + // isa/cast/dyn_cast support static bool classof(const ExternalASTSource *Source) { return Source->SemaSource; |