summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriter.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-03-13 03:12:56 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-03-13 03:12:56 +0000
commit05afe5e0841e08889d8fc7b2fe9d0ced91578cc7 (patch)
tree6fa6e0e87cd118d66bea1cef22dc66ba5c0bbaa3 /clang/lib/Serialization/ASTWriter.cpp
parent9096603ae17c33013680e22511cb21ecdb07946f (diff)
downloadbcm5719-llvm-05afe5e0841e08889d8fc7b2fe9d0ced91578cc7.tar.gz
bcm5719-llvm-05afe5e0841e08889d8fc7b2fe9d0ced91578cc7.zip
Fix PR10447: lazily building name lookup tables for DeclContexts was broken.
The deferred lookup table building step couldn't accurately tell which Decls should be included in the lookup table, and consequently built different tables in some cases. Fix this by removing lazy building of DeclContext name lookup tables. In practice, the laziness was frequently not worthwhile in C++, because we performed lookup into most DeclContexts. In C, it had a bit more value, since there is no qualified lookup. In the place of lazy lookup table building, we simply don't build lookup tables for function DeclContexts at all. Such name lookup tables are not useful, since they don't capture the scoping information required to correctly perform name lookup in a function scope. The resulting performance delta is within the noise on my testing, but appears to be a very slight win for C++ and a very slight loss for C. The C performance can probably be recovered (if it is a measurable problem) by avoiding building the lookup table for the translation unit. llvm-svn: 152608
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud