xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/mangle-std-externc.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 %s -DNS=std -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s --check-prefix=CHECK-STD
2*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 %s -DNS=n -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s --check-prefix=CHECK-N
3f4a2713aSLionel Sambuc 
4f4a2713aSLionel Sambuc // _ZNSt1DISt1CE1iE = std::D<std::C>::i
5f4a2713aSLionel Sambuc // CHECK-STD: @_ZNSt1DISt1CE1iE =
6f4a2713aSLionel Sambuc 
7f4a2713aSLionel Sambuc // _ZN1n1DINS_1CEE1iE == n::D<n::C>::i
8f4a2713aSLionel Sambuc // CHECK-N: @_ZN1n1DINS_1CEE1iE =
9f4a2713aSLionel Sambuc 
10f4a2713aSLionel Sambuc namespace NS {
11f4a2713aSLionel Sambuc   extern "C" {
12f4a2713aSLionel Sambuc     class C {
13f4a2713aSLionel Sambuc     };
14f4a2713aSLionel Sambuc   }
15f4a2713aSLionel Sambuc 
16f4a2713aSLionel Sambuc   template <class T>
17f4a2713aSLionel Sambuc   class D {
18f4a2713aSLionel Sambuc   public:
19f4a2713aSLionel Sambuc     static int i;
20f4a2713aSLionel Sambuc   };
21f4a2713aSLionel Sambuc 
22f4a2713aSLionel Sambuc }
23f4a2713aSLionel Sambuc 
24f4a2713aSLionel Sambuc 
f()25f4a2713aSLionel Sambuc int f() {
26f4a2713aSLionel Sambuc   return NS::D<NS::C>::i;
27f4a2713aSLionel Sambuc }
28