diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-01-07 09:11:48 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-01-07 09:11:48 +0000 |
commit | f5c9f9fd6f5e2850b9b0f19283430245b696c6e5 (patch) | |
tree | eaf11351dbbffd667d8f3cbf539cf784d629e925 /test/Modules/namespaces.cpp | |
parent | 72899c34e3d1abfffa241ad0ce5c4bf175e5ea51 (diff) |
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
Diffstat (limited to 'test/Modules/namespaces.cpp')
-rw-r--r-- | test/Modules/namespaces.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Modules/namespaces.cpp b/test/Modules/namespaces.cpp new file mode 100644 index 0000000000..75557ba4c1 --- /dev/null +++ b/test/Modules/namespaces.cpp @@ -0,0 +1,15 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodule-cache-path %t -I %S/Inputs %s -verify + +@import namespaces_left; +@import namespaces_right; + +void test() { + int &ir1 = N1::f(1); + int &ir2 = N2::f(1); + int &ir3 = N3::f(1); + float &fr1 = N1::f(1.0f); + float &fr2 = N2::f(1.0f); + double &dr1 = N2::f(1.0); + double &dr2 = N3::f(1.0); +} |