forked from OSchip/llvm-project
When collecting all of the redeclarations of a declaration loaded from
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. llvm-svn: 148314
This commit is contained in:
parent
d53ae83516
commit
41dc6ff524
|
@ -2131,7 +2131,10 @@ namespace {
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue