diff options
author | James Molloy <james.molloy@arm.com> | 2012-03-05 09:59:43 +0000 |
---|---|---|
committer | James Molloy <james.molloy@arm.com> | 2012-03-05 09:59:43 +0000 |
commit | b3c312ce4d94a037a83ba6df6650b0317b15edd1 (patch) | |
tree | 9a7851a79cdb72b0a15346ef3badadb5883d1c72 /test/CodeGenCXX/mangle-std-externc.cpp | |
parent | 2a2781805a6b55573d369e34c5dcfba307ce83e9 (diff) |
Fix a bug in the mangler where in 'namespace std { extern "C" {X;} }', X would not be seen to be in ::std::.
Migrate two other places where the same logic is used to use the helper function that already exists.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152022 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/mangle-std-externc.cpp')
-rw-r--r-- | test/CodeGenCXX/mangle-std-externc.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/CodeGenCXX/mangle-std-externc.cpp b/test/CodeGenCXX/mangle-std-externc.cpp new file mode 100644 index 0000000000..a478dee4a4 --- /dev/null +++ b/test/CodeGenCXX/mangle-std-externc.cpp @@ -0,0 +1,27 @@ +// RUN: %clang_cc1 %s -DNS=std -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-STD +// RUN: %clang_cc1 %s -DNS=n -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-N + +// _ZNSt1DISt1CE1iE = std::D<std::C>::i +// CHECK-STD: @_ZNSt1DISt1CE1iE = + +// _ZN1n1DINS_1CEE1iE == n::D<n::C>::i +// CHECK-N: @_ZN1n1DINS_1CEE1iE = + +namespace NS { + extern "C" { + class C { + }; + } + + template <class T> + class D { + public: + static int i; + }; + +} + + +int f() { + return NS::D<NS::C>::i; +} |