Fix stack overflow and improve performance when a module contains many
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 8 Feb 2013 00:37:45 +0000 (00:37 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 8 Feb 2013 00:37:45 +0000 (00:37 +0000)
commit75fc3bf5fe9ad5ad38492902b07ede50de3f18d4
treee121f71514620a61cb040bd3498c9f3dc0a00c04
parente4c7e855f118a9f44af46fbd2e6a17c9c1745a21
Fix stack overflow and improve performance when a module contains many
overloads of a name by claiming that there are no lookup results for that name
in modules while loading the names from the module. Lookups in deserialization
really don't want to find names which they themselves are in the process of
introducing. This also has the pleasant side-effect of automatically caching
PCH lookups which found no names.

The runtime here is still quadratic in the number of overloads, but the
constant is lower.

llvm-svn: 174685
clang/lib/AST/DeclBase.cpp
clang/test/Modules/Inputs/cxx-many-overloads.h [new file with mode: 0644]
clang/test/Modules/Inputs/module.map
clang/test/Modules/cxx-many-overloads.cpp [new file with mode: 0644]