summaryrefslogtreecommitdiffstats
path: root/include/clang/AST/DependentDiagnostic.h
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-03-16 06:12:59 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-03-16 06:12:59 +0000
commitc5d3e80c64af9604ad798282cc6861f9cd2afc52 (patch)
treec5407633b5ffd30f1dde7cd8a8517ae64f3d1d49 /include/clang/AST/DependentDiagnostic.h
parentce612f5a7d306f919c7ae57fcd8c5ecb5d83d54e (diff)
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
Diffstat (limited to 'include/clang/AST/DependentDiagnostic.h')
-rw-r--r--include/clang/AST/DependentDiagnostic.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/clang/AST/DependentDiagnostic.h b/include/clang/AST/DependentDiagnostic.h
index 2bbe5020cb..948dcb461a 100644
--- a/include/clang/AST/DependentDiagnostic.h
+++ b/include/clang/AST/DependentDiagnostic.h
@@ -177,7 +177,7 @@ inline DeclContext::ddiag_iterator DeclContext::ddiag_begin() const {
assert(isDependentContext()
&& "cannot iterate dependent diagnostics of non-dependent context");
const DependentStoredDeclsMap *Map
- = static_cast<DependentStoredDeclsMap*>(getPrimaryContext()->LookupPtr);
+ = static_cast<DependentStoredDeclsMap*>(getPrimaryContext()->getLookupPtr());
if (!Map) return ddiag_iterator();
return ddiag_iterator(Map->FirstDiagnostic);