From 7583ccdc1f1d78e2a4b906a8ad9b55b0a1efcc4c Mon Sep 17 00:00:00 2001 From: James Molloy Date: Mon, 5 Mar 2012 09:59:43 +0000 Subject: 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. llvm-svn: 152022 --- clang/test/CodeGenCXX/mangle-std-externc.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 clang/test/CodeGenCXX/mangle-std-externc.cpp (limited to 'clang/test') diff --git a/clang/test/CodeGenCXX/mangle-std-externc.cpp b/clang/test/CodeGenCXX/mangle-std-externc.cpp new file mode 100644 index 00000000000..a478dee4a42 --- /dev/null +++ b/clang/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::i +// CHECK-STD: @_ZNSt1DISt1CE1iE = + +// _ZN1n1DINS_1CEE1iE == n::D::i +// CHECK-N: @_ZN1n1DINS_1CEE1iE = + +namespace NS { + extern "C" { + class C { + }; + } + + template + class D { + public: + static int i; + }; + +} + + +int f() { + return NS::D::i; +} -- cgit v1.2.3