The current vector mangling is "U8__vector". GCC in SVN has a new mangling which reads "Dv" #elem '_'. This patch implements the new format allowing us to write overloads of different sized vectors. I've tested this against binutils from CVS.

Please review!

Nick
Index: lib/CodeGen/Mangle.cpp
===================================================================
--- lib/CodeGen/Mangle.cpp	(revision 99610)
+++ lib/CodeGen/Mangle.cpp	(working copy)
@@ -1137,14 +1137,16 @@
 
 // GNU extension: vector types
 void CXXNameMangler::mangleType(const VectorType *T) {
-  Out << "U8__vector";
+  Out << "Dv" << T->getNumElements() << '_';
   mangleType(T->getElementType());
 }
 void CXXNameMangler::mangleType(const ExtVectorType *T) {
   mangleType(static_cast<const VectorType*>(T));
 }
 void CXXNameMangler::mangleType(const DependentSizedExtVectorType *T) {
-  Out << "U8__vector";
+  Out << "Dv";
+  mangleExpression(T->getSizeExpr());
+  Out << '_';
   mangleType(T->getElementType());
 }
 
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to