diff options
Diffstat (limited to 'include/clang/Serialization/ASTBitCodes.h')
-rw-r--r-- | include/clang/Serialization/ASTBitCodes.h | 41 |
1 files changed, 37 insertions, 4 deletions
diff --git a/include/clang/Serialization/ASTBitCodes.h b/include/clang/Serialization/ASTBitCodes.h index df56d57d56..c0d9edff4b 100644 --- a/include/clang/Serialization/ASTBitCodes.h +++ b/include/clang/Serialization/ASTBitCodes.h @@ -444,9 +444,9 @@ namespace clang { /// which stores information about #line directives. SOURCE_MANAGER_LINE_TABLE = 48, - /// \brief Record code for ObjC categories in a module that are chained to - /// an interface. - OBJC_CHAINED_CATEGORIES = 49, + /// \brief Record code for map of Objective-C class definition IDs to the + /// ObjC categories in a module that are attached to that class. + OBJC_CATEGORIES_MAP = 49, /// \brief Record code for a file sorted array of DeclIDs in a module. FILE_SORTED_DECLS = 50, @@ -462,7 +462,14 @@ namespace clang { /// /// This array can only be interpreted properly using the local /// redeclarations map. - LOCAL_REDECLARATIONS = 53 + LOCAL_REDECLARATIONS = 53, + + /// \brief Record code for the array of Objective-C categories (including + /// extensions). + /// + /// This array can only be interpreted properly using the Objective-C + /// categories map. + OBJC_CATEGORIES }; /// \brief Record types used within a source manager block. @@ -1225,6 +1232,32 @@ namespace clang { } }; + /// \brief Describes the categories of an Objective-C class. + struct ObjCCategoriesInfo { + DeclID DefinitionID; // The ID of the definition + unsigned Offset; // Offset into the array of category lists. + + friend bool operator<(const ObjCCategoriesInfo &X, + const ObjCCategoriesInfo &Y) { + return X.DefinitionID < Y.DefinitionID; + } + + friend bool operator>(const ObjCCategoriesInfo &X, + const ObjCCategoriesInfo &Y) { + return X.DefinitionID > Y.DefinitionID; + } + + friend bool operator<=(const ObjCCategoriesInfo &X, + const ObjCCategoriesInfo &Y) { + return X.DefinitionID <= Y.DefinitionID; + } + + friend bool operator>=(const ObjCCategoriesInfo &X, + const ObjCCategoriesInfo &Y) { + return X.DefinitionID >= Y.DefinitionID; + } + }; + /// @} } } // end namespace clang |