2015-03-20 05:54:30 +08:00
|
|
|
// RUN: %clang_cc1 -fms-extensions -fno-rtti -emit-llvm %s -o - -triple=i386-pc-win32 -fms-compatibility-version=19.00 | FileCheck %s --check-prefix=CHECK --check-prefix=MSVC2015
|
|
|
|
// RUN: %clang_cc1 -fms-extensions -fno-rtti -emit-llvm %s -o - -triple=i386-pc-win32 -fms-compatibility-version=18.00 | FileCheck %s --check-prefix=CHECK --check-prefix=MSVC2013
|
2012-06-13 08:18:14 +08:00
|
|
|
|
2018-03-17 04:36:49 +08:00
|
|
|
// CHECK: @"??_7B@?1??foo@A@@QAEXH@Z@6B@" =
|
|
|
|
// CHECK: @"??_7D@C@?1??foo@@YAXXZ@6B@" =
|
|
|
|
// MSVC2013: define {{.*}} @"?baz@E@?3??bar@C@?1??foo@@YAXXZ@QAEXXZ@QAEXXZ"(
|
|
|
|
// MSVC2015: define {{.*}} @"?baz@E@?1??bar@C@?1??foo@@YAXXZ@QAEXXZ@QAEXXZ"(
|
2012-06-13 08:18:14 +08:00
|
|
|
|
|
|
|
// Microsoft Visual C++ ABI examples.
|
|
|
|
struct A {
|
|
|
|
void foo (int) {
|
|
|
|
struct B { virtual ~B() {} };
|
|
|
|
B();
|
|
|
|
}
|
|
|
|
};
|
2014-03-05 16:57:59 +08:00
|
|
|
inline void foo () {
|
2012-06-13 08:18:14 +08:00
|
|
|
struct C {
|
|
|
|
struct D { virtual ~D() {} };
|
|
|
|
void bar () {
|
|
|
|
struct E {
|
|
|
|
void baz() { }
|
|
|
|
};
|
|
|
|
E().baz();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
A().foo(0);
|
|
|
|
C::D();
|
|
|
|
C().bar();
|
|
|
|
}
|
2014-03-05 16:57:59 +08:00
|
|
|
void call () {
|
|
|
|
foo();
|
|
|
|
}
|