aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHWriterDecl.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2010-07-23 23:49:55 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2010-07-23 23:49:55 +0000
commitf2f0f03d08c6143137a79a8edffc7d41823bc3c7 (patch)
tree91df81088e1d756f673a35141a3c32a27161b913 /lib/Frontend/PCHWriterDecl.cpp
parentc4b5bd89e1ef611c7a31b767763030acc45274c8 (diff)
Make declarations in the dependent PCH visible, for C at least.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109292 91177308-0d34-0410-b5e6-96231b3b80d8
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)