r230789 - [modules] Avoid the possibility of a redeclaration chain not being marked 'up
Richard Smith
richard-llvm at metafoo.co.uk
Fri Feb 27 12:14:19 PST 2015
Author: rsmith
Date: Fri Feb 27 14:14:19 2015
New Revision: 230789
URL: http://llvm.org/viewvc/llvm-project?rev=230789&view=rev
Log:
[modules] Avoid the possibility of a redeclaration chain not being marked 'up
to date' after it gets updated.
Modified:
cfe/trunk/include/clang/AST/ExternalASTSource.h
cfe/trunk/lib/Serialization/ASTReader.cpp
Modified: cfe/trunk/include/clang/AST/ExternalASTSource.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExternalASTSource.h?rev=230789&r1=230788&r2=230789&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ExternalASTSource.h (original)
+++ cfe/trunk/include/clang/AST/ExternalASTSource.h Fri Feb 27 14:14:19 2015
@@ -412,6 +412,7 @@ public:
void set(T NewValue) {
if (LazyData *LazyVal = Value.template dyn_cast<LazyData*>()) {
LazyVal->LastValue = NewValue;
+ LazyVal->LastGeneration = LazyVal->ExternalSource->getGeneration();
return;
}
Value = NewValue;
Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=230789&r1=230788&r2=230789&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Fri Feb 27 14:14:19 2015
@@ -8317,10 +8317,9 @@ void ASTReader::finishPendingActions() {
PendingIncompleteDeclChains.clear();
// Load pending declaration chains.
- for (unsigned I = 0; I != PendingDeclChains.size(); ++I) {
+ for (unsigned I = 0; I != PendingDeclChains.size(); ++I)
loadPendingDeclChain(PendingDeclChains[I]);
- PendingDeclChainsKnown.erase(PendingDeclChains[I]);
- }
+ PendingDeclChainsKnown.clear();
PendingDeclChains.clear();
// Make the most recent of the top-level declarations visible.
More information about the cfe-commits
mailing list