summaryrefslogtreecommitdiffstats
path: root/clang/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
commit78f5177d3700c024f642fc1d6a3e2cec452cfd30 (patch)
tree0d87df0b35a5d75581a53f2a8f24e7b8c14d42bc /clang/lib/Frontend/PCHWriter.cpp
parent9d8854ec6014b3cb9db87f7a385e9000cfa3ef5b (diff)
downloadbcm5719-llvm-78f5177d3700c024f642fc1d6a3e2cec452cfd30.tar.gz
bcm5719-llvm-78f5177d3700c024f642fc1d6a3e2cec452cfd30.zip
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.
llvm-svn: 110052
Diffstat (limited to 'clang/lib/Frontend/PCHWriter.cpp')
-rw-r--r--clang/lib/Frontend/PCHWriter.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Frontend/PCHWriter.cpp b/clang/lib/Frontend/PCHWriter.cpp
index 8bf85efd62b..641492ca598 100644
--- a/clang/lib/Frontend/PCHWriter.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud