Mangle tag types (unions, structs, classes, enums) in the Microsoft C++ Mangler.

Also, test that static members with default visibility in a struct have the
right mangling.

llvm-svn: 106276
diff --git a/clang/test/CodeGenCXX/mangle-ms.cpp b/clang/test/CodeGenCXX/mangle-ms.cpp
index 6787b6b..a528054 100644
--- a/clang/test/CodeGenCXX/mangle-ms.cpp
+++ b/clang/test/CodeGenCXX/mangle-ms.cpp
@@ -6,6 +6,7 @@
 // CHECK: @"\01?d@foo@@0FB"
 // CHECK: @"\01?e@foo@@1JC"
 // CHECK: @"\01?f@foo@@2DD"
+// CHECK: @"\01?g@bar@@2HA"
 
 int a;
 
@@ -24,6 +25,22 @@
   int operator+(int a);
 };
 
+struct bar {
+  static int g;
+};
+
+union baz {
+  int a;
+  char b;
+  double c;
+};
+
+enum quux {
+  qone,
+  qtwo,
+  qthree
+};
+
 int foo::operator+(int a) {return a;}
 // CHECK: @"\01??Hfoo@@QAAHH@Z"
 
@@ -31,6 +48,8 @@
 volatile long foo::e;
 const volatile char foo::f = 'C';
 
+int bar::g;
+
 // Static functions are mangled, too.
 // Also make sure calling conventions, arglists, and throw specs work.
 static void __stdcall alpha(float a, double b) throw() {}
@@ -42,3 +61,7 @@
 
 // CHECK: @"\01?alpha@@YGXMN@@"
 
+// Make sure tag-type mangling works.
+void gamma(class foo, struct bar, union baz, enum quux) {}
+// CHECK: @"\01?gamma@@YAXVfoo@@Ubar@@Tbaz@@W4quux@@@Z"
+