Do not deserialize decls, while iterating to unload.

This commit is contained in:
Vassil Vassilev 2014-09-29 15:45:07 +02:00 committed by sftnight
parent 08a9274c02
commit a6e5bb5300

View File

@ -835,8 +835,8 @@ namespace clang {
typedef llvm::SmallVector<Decl*, 64> Decls;
Decls declsToErase;
// Removing from single-linked list invalidates the iterators.
for (DeclContext::decl_iterator I = DC->decls_begin();
I != DC->decls_end(); ++I) {
for (DeclContext::decl_iterator I = DC->noload_decls_begin();
I != DC->noload_decls_end(); ++I) {
declsToErase.push_back(*I);
}