xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/mangle-ms-abi-examples.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -fms-extensions -fno-rtti -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
2f4a2713aSLionel Sambuc 
3f4a2713aSLionel Sambuc // CHECK: @"\01??_7D@C@?1??foo@@YAXXZ@6B@" =
4f4a2713aSLionel Sambuc // CHECK: @"\01??_7B@?1??foo@A@@QAEXH@Z@6B@" =
5f4a2713aSLionel Sambuc // CHECK: define {{.*}} @"\01?baz@E@?3??bar@C@?1??foo@@YAXXZ@QAEXXZ@QAEXXZ"(
6f4a2713aSLionel Sambuc 
7f4a2713aSLionel Sambuc // Microsoft Visual 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()14*0a6a1f1dSLionel Sambuc inline 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 }
call()28*0a6a1f1dSLionel Sambuc void call () {
29*0a6a1f1dSLionel Sambuc   foo();
30*0a6a1f1dSLionel Sambuc }
31