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