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