summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/mangle-ms.cpp
diff options
context:
space:
mode:
authorCharles Davis <cdavis@mines.edu>2010-06-16 05:33:16 +0000
committerCharles Davis <cdavis@mines.edu>2010-06-16 05:33:16 +0000
commit89338af1ff78aff34702f98e84e37f36385cc4f8 (patch)
tree1a280e4554ca602cd04b0d1f9a0425ae6d9e4315 /clang/test/CodeGenCXX/mangle-ms.cpp
parent1b54c88cc4f8582222644d65dfd61703206430ef (diff)
downloadbcm5719-llvm-89338af1ff78aff34702f98e84e37f36385cc4f8.tar.gz
bcm5719-llvm-89338af1ff78aff34702f98e84e37f36385cc4f8.zip
Start mangling function types in the Microsoft C++ Mangler.
llvm-svn: 106081
Diffstat (limited to 'clang/test/CodeGenCXX/mangle-ms.cpp')
-rw-r--r--clang/test/CodeGenCXX/mangle-ms.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/mangle-ms.cpp b/clang/test/CodeGenCXX/mangle-ms.cpp
index 9748c107aaa..f6101ea7ebf 100644
--- a/clang/test/CodeGenCXX/mangle-ms.cpp
+++ b/clang/test/CodeGenCXX/mangle-ms.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-apple-darwin10 | FileCheck %s
+// RUN: %clang_cc1 -fms-extensions -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-apple-darwin10 | FileCheck %s
// CHECK: @"\01?a@@3HA"
// CHECK: @"\01?b@N@@3HA"
@@ -13,6 +13,7 @@ namespace N { int b; }
static int c;
int _c(void) {return c;}
+// CHECK: @"\01?_c@@YAHXZ"
class foo {
static const short d;
@@ -26,3 +27,14 @@ const short foo::d = 0;
volatile long foo::e;
const volatile char foo::f = 'C';
+// 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@@"
+
OpenPOWER on IntegriCloud