Add basic substitution to the C++ mangler. It currently only looks at types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82102 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/mangle-subst.cpp b/test/CodeGenCXX/mangle-subst.cpp
new file mode 100644
index 0000000..fc73048
--- /dev/null
+++ b/test/CodeGenCXX/mangle-subst.cpp
@@ -0,0 +1,20 @@
+// RUN: clang-cc -emit-llvm %s -o %t -triple=x86_64-apple-darwin9 && 
+
+struct X {};
+
+// RUN: grep "define void @_Z1f1XS_" %t | count 1 &&
+void f(X, X) { }
+
+// RUN: grep "define void @_Z1fR1XS0_" %t | count 1 &&
+void f(X&, X&) { }
+
+// RUN: grep "define void @_Z1fRK1XS1_" %t | count 1 &&
+void f(const X&, const X&) { }
+
+typedef void T();
+struct S {};
+
+// RUN: grep "define void @_Z1fPFvvEM1SFvvE" %t | count 1 &&
+void f(T*, T (S::*)) {}
+
+// RUN: true