a module file, be sure to also add the first (potentially canonical)
declarations to the chain. This isn't guaranteed to occur because the
first declaration is not listed in the stored redeclaration chain.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148314
91177308-0d34-0410-b5e6-
96231b3b80d8
llvm::SmallPtrSet<Decl *, 16> &Deserialized,
GlobalDeclID CanonID)
: Reader(Reader), SearchDecls(SearchDecls), Deserialized(Deserialized),
- CanonID(CanonID) { }
+ CanonID(CanonID) {
+ for (unsigned I = 0, N = SearchDecls.size(); I != N; ++I)
+ addToChain(Reader.GetDecl(SearchDecls[I]));
+ }
static bool visit(ModuleFile &M, bool Preorder, void *UserData) {
if (Preorder)