xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/mangle-abi-examples.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc // CHECK: @_ZTVZ3foovEN1C1DE =
4*f4a2713aSLionel Sambuc // CHECK: @_ZTVZN1A3fooEiE1B =
5*f4a2713aSLionel Sambuc // CHECK: define {{.*}} @_ZZZ3foovEN1C3barEvEN1E3bazEv(
6*f4a2713aSLionel Sambuc 
7*f4a2713aSLionel Sambuc // Itanium C++ ABI examples.
8*f4a2713aSLionel Sambuc struct A {
9*f4a2713aSLionel Sambuc   void foo (int) {
10*f4a2713aSLionel Sambuc     struct B { virtual ~B() {} };
11*f4a2713aSLionel Sambuc     B();
12*f4a2713aSLionel Sambuc   }
13*f4a2713aSLionel Sambuc };
14*f4a2713aSLionel Sambuc void foo () {
15*f4a2713aSLionel Sambuc   struct C {
16*f4a2713aSLionel Sambuc     struct D { virtual ~D() {} };
17*f4a2713aSLionel Sambuc     void bar () {
18*f4a2713aSLionel Sambuc       struct E {
19*f4a2713aSLionel Sambuc         void baz() { }
20*f4a2713aSLionel Sambuc       };
21*f4a2713aSLionel Sambuc       E().baz();
22*f4a2713aSLionel Sambuc     }
23*f4a2713aSLionel Sambuc   };
24*f4a2713aSLionel Sambuc   A().foo(0);
25*f4a2713aSLionel Sambuc   C::D();
26*f4a2713aSLionel Sambuc   C().bar();
27*f4a2713aSLionel Sambuc }
28