aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Serialization/Module.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-01-27 01:47:08 +0000
committerDouglas Gregor <dgregor@apple.com>2012-01-27 01:47:08 +0000
commitcff9f26ce0ed76d555cd33b3dca84dd5cdf376af (patch)
tree6186247a39adb73209e02819b1d3078a7ec00dde /include/clang/Serialization/Module.h
parent6895a644ca9df03af14ad06deaa950a09dd352d2 (diff)
Reimplement (de-)serialization of Objective-C categories to eliminate
the direct serialization of the linked-list structure. Instead, use a scheme similar to how we handle redeclarations, with redeclaration lists on the side. This addresses several issues: - In cases involving mixing and matching of many categories across many modules, the linked-list structure would not be consistent across different modules, and categories would get lost. - If a module is loaded after the class definition and its other categories have already been loaded, we wouldn't see any categories in the newly-loaded module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149112 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Serialization/Module.h')
-rw-r--r--include/clang/Serialization/Module.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/include/clang/Serialization/Module.h b/include/clang/Serialization/Module.h
index 831a873ac1..34f208d71f 100644
--- a/include/clang/Serialization/Module.h
+++ b/include/clang/Serialization/Module.h
@@ -286,15 +286,6 @@ public:
/// for each DeclContext.
DeclContextInfosMap DeclContextInfos;
- typedef llvm::DenseMap<serialization::GlobalDeclID,
- std::pair<serialization::LocalDeclID, serialization::LocalDeclID> >
- ChainedObjCCategoriesMap;
- /// \brief ObjC categories that got chained to an interface from another
- /// module.
- /// Key is the ID of the interface.
- /// Value is a pair of linked category DeclIDs (head category, tail category).
- ChainedObjCCategoriesMap ChainedObjCCategories;
-
/// \brief Array of file-level DeclIDs sorted by file.
const serialization::DeclID *FileSortedDecls;
@@ -302,13 +293,24 @@ public:
/// module file, sorted by the first declaration ID.
const serialization::LocalRedeclarationsInfo *RedeclarationsMap;
- /// \brief The number of redeclaration info entries in RedeclarationsInfo.
+ /// \brief The number of redeclaration info entries in RedeclarationsMap.
unsigned LocalNumRedeclarationsInMap;
/// \brief The redeclaration chains for declarations local to this
/// module file.
SmallVector<uint64_t, 1> RedeclarationChains;
+ /// \brief Array of category list location information within this
+ /// module file, sorted by the definition ID.
+ const serialization::ObjCCategoriesInfo *ObjCCategoriesMap;
+
+ /// \brief The number of redeclaration info entries in ObjCCategoriesMap.
+ unsigned LocalNumObjCCategoriesInMap;
+
+ /// \brief The Objective-C category lists for categories known to this
+ /// module.
+ SmallVector<uint64_t, 1> ObjCCategories;
+
// === Types ===
/// \brief The number of types in this AST file.