Mangling of undeduced 'auto' types, as specified by Itanium C++ ABI.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126140 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ItaniumMangle.cpp b/lib/AST/ItaniumMangle.cpp
index d66c374..e2dbb83 100644
--- a/lib/AST/ItaniumMangle.cpp
+++ b/lib/AST/ItaniumMangle.cpp
@@ -1647,8 +1647,11 @@
 
 void CXXNameMangler::mangleType(const AutoType *T) {
   QualType D = T->getDeducedType();
-  assert(!D.isNull() && "can't mangle undeduced auto type");
-  mangleType(D);
+  // <builtin-type> ::= Da  # dependent auto
+  if (D.isNull())
+    Out << "Da";
+  else
+    mangleType(D);
 }
 
 void CXXNameMangler::mangleIntegerLiteral(QualType T,