aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHWriter.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2010-08-02 18:30:12 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2010-08-02 18:30:12 +0000
commitd8c5abb096a5f6babb3709180fe304be5462bcc1 (patch)
treee43d091760c13cca18a25aacb234fc910acbf73e /lib/Frontend/PCHWriter.cpp
parented48a8faa10b6750f334540711c7b3949bbfb3ae (diff)
Query only the latest version of an identifier in the PCH chain. Make sure this version holds the entire declaration chain. This is a much saner solution than trying to merge the info from all elements, and makes redeclarations work properly. Expand the declarations test case to cover more compliated cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110052 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHWriter.cpp')
-rw-r--r--lib/Frontend/PCHWriter.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Frontend/PCHWriter.cpp b/lib/Frontend/PCHWriter.cpp
index 8bf85efd62..641492ca59 100644
--- a/lib/Frontend/PCHWriter.cpp
+++ b/lib/Frontend/PCHWriter.cpp
@@ -1819,8 +1819,7 @@ public:
for (IdentifierResolver::iterator D = IdentifierResolver::begin(II),
DEnd = IdentifierResolver::end();
D != DEnd; ++D)
- if (!Writer.hasChain() || (*D)->getPCHLevel() == 0)
- DataLen += sizeof(pch::DeclID);
+ DataLen += sizeof(pch::DeclID);
}
clang::io::Emit16(Out, DataLen);
// We emit the key length after the data length so that every
@@ -1872,8 +1871,7 @@ public:
for (llvm::SmallVector<Decl *, 16>::reverse_iterator D = Decls.rbegin(),
DEnd = Decls.rend();
D != DEnd; ++D)
- if (!Writer.hasChain() || (*D)->getPCHLevel() == 0)
- clang::io::Emit32(Out, Writer.getDeclID(*D));
+ clang::io::Emit32(Out, Writer.getDeclID(*D));
}
};
} // end anonymous namespace