[ms-cxxabi] Add "$$C" when mangling template arg QualTypes

Credit goes to Timur Iskhodzhanov for finding the problem and solution.

llvm-svn: 179093
diff --git a/clang/test/CodeGenCXX/mangle-ms-templates.cpp b/clang/test/CodeGenCXX/mangle-ms-templates.cpp
index d0e8af4..7b7f30b 100644
--- a/clang/test/CodeGenCXX/mangle-ms-templates.cpp
+++ b/clang/test/CodeGenCXX/mangle-ms-templates.cpp
@@ -35,6 +35,18 @@
   c1.method();
 // CHECK: call {{.*}} @"\01?method@?$Class@VTypename@@@@QAEXXZ"
 
+  Class<const Typename> c1_const;
+  Class<volatile Typename> c1_volatile;
+  Class<const volatile Typename> c1_cv;
+  c1_const.method();
+  c1_volatile.method();
+  c1_cv.method();
+// Types with qualifiers have an extra $$C escape when used as template
+// arguments.  Not sure why.
+// CHECK: call {{.*}} @"\01?method@?$Class@$$CBVTypename@@@@QAEXXZ"
+// CHECK: call {{.*}} @"\01?method@?$Class@$$CCVTypename@@@@QAEXXZ"
+// CHECK: call {{.*}} @"\01?method@?$Class@$$CDVTypename@@@@QAEXXZ"
+
   Class<Nested<Typename> > c2;
   c2.method();
 // CHECK: call {{.*}} @"\01?method@?$Class@V?$Nested@VTypename@@@@@@QAEXXZ"