aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHWriterDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Frontend/PCHWriterDecl.cpp')
-rw-r--r--lib/Frontend/PCHWriterDecl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Frontend/PCHWriterDecl.cpp b/lib/Frontend/PCHWriterDecl.cpp
index 7c4a21adb6..09cafe2c33 100644
--- a/lib/Frontend/PCHWriterDecl.cpp
+++ b/lib/Frontend/PCHWriterDecl.cpp
@@ -1144,9 +1144,9 @@ void PCHWriter::WriteDecl(ASTContext &Context, Decl *D) {
// Determine the ID for this declaration
pch::DeclID &ID = DeclIDs[D];
if (ID == 0)
- ID = DeclIDs.size();
+ ID = NextDeclID++;
- unsigned Index = ID - 1;
+ unsigned Index = ID - FirstDeclID;
// Record the offset for this declaration
if (DeclOffsets.size() == Index)