2010-06-16 13:33:16 +08:00
|
|
|
// RUN: %clang_cc1 -fms-extensions -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-apple-darwin10 | FileCheck %s
|
2010-06-11 11:07:32 +08:00
|
|
|
|
2010-06-14 13:29:01 +08:00
|
|
|
// CHECK: @"\01?a@@3HA"
|
|
|
|
// CHECK: @"\01?b@N@@3HA"
|
2010-06-12 16:11:16 +08:00
|
|
|
// CHECK: @c
|
2010-06-14 13:29:01 +08:00
|
|
|
// CHECK: @"\01?d@foo@@0FB"
|
|
|
|
// CHECK: @"\01?e@foo@@1JC"
|
|
|
|
// CHECK: @"\01?f@foo@@2DD"
|
2010-06-12 16:11:16 +08:00
|
|
|
|
|
|
|
int a;
|
2010-06-11 11:07:32 +08:00
|
|
|
|
|
|
|
namespace N { int b; }
|
2010-06-12 16:11:16 +08:00
|
|
|
|
|
|
|
static int c;
|
|
|
|
int _c(void) {return c;}
|
2010-06-16 13:33:16 +08:00
|
|
|
// CHECK: @"\01?_c@@YAHXZ"
|
2010-06-12 16:11:16 +08:00
|
|
|
|
2010-06-14 13:29:01 +08:00
|
|
|
class foo {
|
|
|
|
static const short d;
|
|
|
|
protected:
|
|
|
|
static volatile long e;
|
|
|
|
public:
|
|
|
|
static const volatile char f;
|
|
|
|
};
|
|
|
|
|
|
|
|
const short foo::d = 0;
|
|
|
|
volatile long foo::e;
|
|
|
|
const volatile char foo::f = 'C';
|
|
|
|
|
2010-06-16 13:33:16 +08:00
|
|
|
// Static functions are mangled, too.
|
|
|
|
// Also make sure calling conventions, arglists, and throw specs work.
|
|
|
|
static void __stdcall alpha(float a, double b) throw() {}
|
|
|
|
bool __fastcall beta(long long a, wchar_t b) throw(signed char, unsigned char) {
|
|
|
|
// CHECK: @"\01?beta@@YI_N_J_W@CE@"
|
|
|
|
alpha(0.f, 0.0);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: @"\01?alpha@@YGXMN@@"
|
|
|
|
|