diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-04-15 12:36:49 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-04-15 12:36:49 +0000 |
commit | b1758c662524e18d65d260188fdcbbdee6a9316b (patch) | |
tree | b935cbabf23c211278ea2d3e2ec809109ea3eb06 /include | |
parent | a9ab209752e4afe059f1456871bc442f28914e37 (diff) |
Use forward declarations for ASTDeclContextNameLookupTable and add a missing delete.
It would be nice to use OwningPtr here, but DeclContextInfo is stored in a DenseMap.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154763 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/Serialization/ASTReader.h | 7 | ||||
-rw-r--r-- | include/clang/Serialization/Module.h | 10 |
2 files changed, 14 insertions, 3 deletions
diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h index 9baaf4bcb5..a0bcecc93a 100644 --- a/include/clang/Serialization/ASTReader.h +++ b/include/clang/Serialization/ASTReader.h @@ -170,6 +170,9 @@ class ReadMethodPoolVisitor; namespace reader { class ASTIdentifierLookupTrait; + /// \brief The on-disk hash table used for the DeclContext's Name lookup table. + typedef OnDiskChainedHashTable<ASTDeclContextNameLookupTrait> + ASTDeclContextNameLookupTable; } } // end namespace serialization @@ -323,7 +326,9 @@ private: // TU, and when we read those update records, the actual context will not // be available yet (unless it's the TU), so have this pending map using the // ID as a key. It will be realized when the context is actually loaded. - typedef SmallVector<std::pair<void *, ModuleFile*>, 1> DeclContextVisibleUpdates; + typedef + SmallVector<std::pair<serialization::reader::ASTDeclContextNameLookupTable *, + ModuleFile*>, 1> DeclContextVisibleUpdates; typedef llvm::DenseMap<serialization::DeclID, DeclContextVisibleUpdates> DeclContextVisibleUpdatesPending; diff --git a/include/clang/Serialization/Module.h b/include/clang/Serialization/Module.h index 4c93c33842..786ecd33c1 100644 --- a/include/clang/Serialization/Module.h +++ b/include/clang/Serialization/Module.h @@ -27,9 +27,14 @@ namespace clang { class DeclContext; class Module; - +template<typename Info> class OnDiskChainedHashTable; + namespace serialization { +namespace reader { + class ASTDeclContextNameLookupTrait; +} + /// \brief Specifies the kind of module that has been loaded. enum ModuleKind { MK_Module, ///< File is a module proper. @@ -43,7 +48,8 @@ struct DeclContextInfo { DeclContextInfo() : NameLookupTableData(), LexicalDecls(), NumLexicalDecls() {} - void *NameLookupTableData; // an ASTDeclContextNameLookupTable. + OnDiskChainedHashTable<reader::ASTDeclContextNameLookupTrait> + *NameLookupTableData; // an ASTDeclContextNameLookupTable. const KindDeclIDPair *LexicalDecls; unsigned NumLexicalDecls; }; |