History log of /external/clang/test/Modules/namespaces.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1b7f9cbed1b96b58a6e5f7808ebc9345a76a0936 13-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Modules/namespaces.cpp
32ad2ee2618745ce3da51c2ae066ed5f21157c07 01-Mar-2012 Ted Kremenek <kremenek@apple.com> Change @import to @__experimental_modules_import. We are not ready to commit to a particular syntax for modules,
and don't have time to push it forward in the near future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151841 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Modules/namespaces.cpp
1c3875dab92f3b0a25212c80863e452cb269d3f1 09-Jan-2012 Douglas Gregor <dgregor@apple.com> When deserializing an anonymous namespace from a module, do not attach
the anonymous namespace to its parent. Semantically, this means that
the anonymous namespaces defined in one module are distinct from the
anonymous namespaces defined in another module.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Modules/namespaces.cpp
0fdc09fe680787b855cf20183c4bd3b83f2c907f 09-Jan-2012 Douglas Gregor <dgregor@apple.com> Implement merging of namespace-scope declarations across modules, so
that we can merge, for example, two occurrences of

namespace N { void f(); }

in two disjoint modules.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Modules/namespaces.cpp
c6c8e0ec96bb64f1b9f543d7c8317c6090f80a30 09-Jan-2012 Douglas Gregor <dgregor@apple.com> Implement redeclaration merging for namespaces defined in distinct
modules. Teach name lookup into namespaces to search in each of the
merged DeclContexts as well as the (now-primary) DeclContext. This
supports the common case where two different modules put something
into the same namespace.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Modules/namespaces.cpp
f5c9f9fd6f5e2850b9b0f19283430245b696c6e5 07-Jan-2012 Douglas Gregor <dgregor@apple.com> Switch NamespaceDecl from its own hand-rolled redeclaration chain over
to Redeclarable<NamespaceDecl>, so that we benefit from the improveed
redeclaration deserialization and merging logic provided by
Redeclarable<T>. Otherwise, no functionality change.

As a drive-by fix, collapse the "inline" bit into the low bit of the
original namespace/anonymous namespace, saving 8 bytes per
NamespaceDecl on x86_64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Modules/namespaces.cpp