]> granicus.if.org Git - clang/commit
Fix Objective-C compilation-time performance regression introduced in r152608.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 16 Mar 2012 06:12:59 +0000 (06:12 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 16 Mar 2012 06:12:59 +0000 (06:12 +0000)
commitc5d3e80c64af9604ad798282cc6861f9cd2afc52
treec5407633b5ffd30f1dde7cd8a8517ae64f3d1d49
parentce612f5a7d306f919c7ae57fcd8c5ecb5d83d54e
Fix Objective-C compilation-time performance regression introduced in r152608.

Reintroduce lazy name lookup table building, ensuring that the lazy building step
produces the same lookup table that would be built by the eager step.

Avoid building a lookup table for the translation unit outside C++, even in cases
where we can't recover the contents of the table from the declaration chain on
the translation unit, since we're not going to perform qualified lookup into it
anyway. Continue to support lazily building such lookup tables for now, though,
since ASTMerge uses them.

In my tests, this performs very similarly to ToT with r152608 backed out, for C,
Obj-C and C++, and does not suffer from PR10447.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152905 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/DeclBase.h
include/clang/AST/DependentDiagnostic.h
lib/AST/DeclBase.cpp
lib/Serialization/ASTWriter.cpp
lib/Serialization/ASTWriterDecl.cpp