diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-08-03 16:05:40 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-08-03 16:05:40 +0000 |
commit | 0a14e4bf604a91b035a479235adf4c2f6c9128a2 (patch) | |
tree | 0d0355a39c539fc160131ff5d3cf16bc6d3301ad /lib/Serialization/ASTWriter.cpp | |
parent | b3de112bf38567a25d5b86790a2327290393dde4 (diff) |
Introduce a constant for the number of predefined declarations in an
AST file, along with an enumeration naming those predefined
declarations. No functionality change, but this will make it easier to
introduce new predefined declarations, when/if we need them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136781 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | lib/Serialization/ASTWriter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp index c3bbecdb0e..fe152b1194 100644 --- a/lib/Serialization/ASTWriter.cpp +++ b/lib/Serialization/ASTWriter.cpp @@ -2039,7 +2039,7 @@ void ASTWriter::WriteTypeDeclOffsets() { Record.clear(); Record.push_back(DECL_OFFSET); Record.push_back(DeclOffsets.size()); - Record.push_back(FirstDeclID - 1); + Record.push_back(FirstDeclID - NUM_PREDEF_DECL_IDS); Stream.EmitRecordWithBlob(DeclOffsetAbbrev, Record, data(DeclOffsets)); } @@ -2740,7 +2740,7 @@ void ASTWriter::SetSelectorOffset(Selector Sel, uint32_t Offset) { ASTWriter::ASTWriter(llvm::BitstreamWriter &Stream) : Stream(Stream), Chain(0), SerializationListener(0), - FirstDeclID(1), NextDeclID(FirstDeclID), + FirstDeclID(NUM_PREDEF_DECL_IDS), NextDeclID(FirstDeclID), FirstTypeID(NUM_PREDEF_TYPE_IDS), NextTypeID(FirstTypeID), FirstIdentID(1), NextIdentID(FirstIdentID), FirstSelectorID(1), NextSelectorID(FirstSelectorID), FirstMacroID(1), NextMacroID(FirstMacroID), |