mangle-ms.cpp revision 65161d17cbf8980e24643c65b74a5127dcb7ac22
1// RUN: %clang_cc1 -fms-extensions -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-apple-darwin10 | FileCheck %s 2 3// CHECK: @"\01?a@@3HA" 4// CHECK: @"\01?b@N@@3HA" 5// CHECK: @c 6// CHECK: @"\01?d@foo@@0FB" 7// CHECK: @"\01?e@foo@@1JC" 8// CHECK: @"\01?f@foo@@2DD" 9 10int a; 11 12namespace N { int b; } 13 14static int c; 15int _c(void) {return c;} 16// CHECK: @"\01?_c@@YAHXZ" 17 18class foo { 19 static const short d; 20protected: 21 static volatile long e; 22public: 23 static const volatile char f; 24}; 25 26const short foo::d = 0; 27volatile long foo::e; 28const volatile char foo::f = 'C'; 29 30// Static functions are mangled, too. 31// Also make sure calling conventions, arglists, and throw specs work. 32static void __stdcall alpha(float a, double b) throw() {} 33bool __fastcall beta(long long a, wchar_t b) throw(signed char, unsigned char) { 34// CHECK: @"\01?beta@@YI_N_J_W@CE@" 35 alpha(0.f, 0.0); 36 return false; 37} 38 39// CHECK: @"\01?alpha@@YGXMN@@" 40 41