diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-08-12 00:15:20 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-08-12 00:15:20 +0000 |
commit | 6bf2b9fbd3e3adc38d4712de79aeaa81d651aa08 (patch) | |
tree | e5eaa8ad4655ff6ff9d0416e6eb55f791985db7e /include/clang/Serialization/ASTBitCodes.h | |
parent | 63ab2c54dc641d4f3d28841aa86affbfdf805d32 (diff) |
In the serialized AST format, make the translation unit a "predefined"
declaration that never actually gets serialized. Instead, serialize
the various kinds of update records (lexical decls, visible decls, the
addition of an anonymous namespace) for the translation unit, even if
we're not chaining. This way, we won't have to deal with multiple
loaded translation unit declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137395 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Serialization/ASTBitCodes.h')
-rw-r--r-- | include/clang/Serialization/ASTBitCodes.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/clang/Serialization/ASTBitCodes.h b/include/clang/Serialization/ASTBitCodes.h index 949265461d..3bd340ab9c 100644 --- a/include/clang/Serialization/ASTBitCodes.h +++ b/include/clang/Serialization/ASTBitCodes.h @@ -674,14 +674,17 @@ namespace clang { /// it is created. enum PredefinedDeclIDs { /// \brief The NULL declaration. - PREDEF_DECL_NULL_ID = 0 + PREDEF_DECL_NULL_ID = 0, + + /// \brief The translation unit. + PREDEF_DECL_TRANSLATION_UNIT_ID = 1 }; /// \brief The number of declaration IDs that are predefined. /// /// For more information about predefined declarations, see the /// \c PredefinedDeclIDs type and the PREDEF_DECL_*_ID constants. - const unsigned int NUM_PREDEF_DECL_IDS = 1; + const unsigned int NUM_PREDEF_DECL_IDS = 2; /// \brief Record codes for each kind of declaration. /// @@ -690,10 +693,8 @@ namespace clang { /// constant describes a record for a specific declaration class /// in the AST. enum DeclCode { - /// \brief A TranslationUnitDecl record. - DECL_TRANSLATION_UNIT = 50, /// \brief A TypedefDecl record. - DECL_TYPEDEF, + DECL_TYPEDEF = 51, /// \brief A TypeAliasDecl record. DECL_TYPEALIAS, /// \brief An EnumDecl record. |