diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-12-21 15:12:03 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-12-21 15:12:03 +0000 |
commit | 596b7cbc19f0426f52b641079d5d4a476e9f6330 (patch) | |
tree | 6874e2a914f5f88ef65a79cd0f2748d66023964d /clang | |
parent | 46f0c15208202a86fac6ea61bc80713d864a9c2d (diff) | |
download | bcm5719-llvm-596b7cbc19f0426f52b641079d5d4a476e9f6330.tar.gz bcm5719-llvm-596b7cbc19f0426f52b641079d5d4a476e9f6330.zip |
Implement a trivial, obvious optimization for deserialization of
redeclaration chains: only ever have the reader search for
redeclarations of the first (canonical) declaration, since we only
ever record redeclaration ranges for the that declaration. Searching
for redeclarations of non-canonical declarations will never find
anything, so it's a complete waste of time.
llvm-svn: 147055
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/Serialization/ASTReaderDecl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp index 77ea318dc07..163cbadcd38 100644 --- a/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/clang/lib/Serialization/ASTReaderDecl.cpp @@ -1416,8 +1416,8 @@ void ASTDeclReader::VisitRedeclarable(Redeclarable<T> *D) { } // Note that we need to load the other declaration chains for this ID. - if (Reader.PendingDeclChainsKnown.insert(ThisDeclID)) - Reader.PendingDeclChains.push_back(ThisDeclID); + if (Reader.PendingDeclChainsKnown.insert(FirstDeclID)) + Reader.PendingDeclChains.push_back(FirstDeclID); } //===----------------------------------------------------------------------===// |