llvm-project/clang/test/Modules
Richard Smith 05afe5e084 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
2012-03-13 03:12:56 +00:00
..
Inputs Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
auto-module-import.m Don't infer a submodule for a framework's private header, at least for now. 2012-01-13 16:54:27 +00:00
compiler_builtins.m Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
cstd.m Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
cycles.c Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
decldef.mm Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
diamond-pch.c Eliminate the uglified keyword __import_module__ for importing 2012-01-03 19:32:59 +00:00
diamond.c Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
driver.c Add test for the driver's handling of modules 2011-09-14 20:29:10 +00:00
header-import.m Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
inferred-submodules.m Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
irgen.c Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
load_failure.c Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
lookup.cpp Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
lookup.m Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
macros.c Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
method_pool.m Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
module-private.cpp Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
namespaces.cpp Fix PR10447: lazily building name lookup tables for DeclContexts was broken. 2012-03-13 03:12:56 +00:00
normal-module-map.cpp Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
objc-categories.m Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
on-demand-build-warnings.m Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
on-demand-build.m Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
on-demand-macros.m Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
redecl-merge.m Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
redeclarations.m Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
requires.m Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
subframeworks.m Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
submodules-preprocess.cpp Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
submodules.cpp Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
submodules.m Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00
wildcard-submodule-exports.cpp Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules, 2012-03-01 22:07:04 +00:00