Charles Davis | e0deb03 | 2012-06-13 00:18:14 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fms-extensions -fno-rtti -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck %s |
| 2 | |
| 3 | // CHECK: @"\01??_7D@C@?1??foo@@YAXXZ@6B@" = |
| 4 | // CHECK: @"\01??_7B@?1??foo@A@@QAEXH@Z@6B@" = |
| 5 | // CHECK: define {{.*}} @"\01?baz@E@?3??bar@C@?1??foo@@YAXXZ@QAEXXZ@QAEXXZ"( |
| 6 | |
| 7 | // Microsoft Visual C++ ABI examples. |
| 8 | struct A { |
| 9 | void foo (int) { |
| 10 | struct B { virtual ~B() {} }; |
| 11 | B(); |
| 12 | } |
| 13 | }; |
| 14 | void foo () { |
| 15 | struct C { |
| 16 | struct D { virtual ~D() {} }; |
| 17 | void bar () { |
| 18 | struct E { |
| 19 | void baz() { } |
| 20 | }; |
| 21 | E().baz(); |
| 22 | } |
| 23 | }; |
| 24 | A().foo(0); |
| 25 | C::D(); |
| 26 | C().bar(); |
| 27 | } |
| 28 | |