r243828 - [MS ABI] Create a mangling for extended vector types

David Majnemer david.majnemer at gmail.com
Fri Jul 31 22:51:55 PDT 2015


Author: majnemer
Date: Sat Aug  1 00:51:55 2015
New Revision: 243828

URL: http://llvm.org/viewvc/llvm-project?rev=243828&view=rev
Log:
[MS ABI] Create a mangling for extended vector types

Extended vector types are mangled just like normal vector types.

Modified:
    cfe/trunk/lib/AST/MicrosoftMangle.cpp
    cfe/trunk/test/CodeGenCXX/mangle-ms-vector-types.cpp

Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/MicrosoftMangle.cpp?rev=243828&r1=243827&r2=243828&view=diff
==============================================================================
--- cfe/trunk/lib/AST/MicrosoftMangle.cpp (original)
+++ cfe/trunk/lib/AST/MicrosoftMangle.cpp Sat Aug  1 00:51:55 2015
@@ -2076,13 +2076,9 @@ void MicrosoftCXXNameMangler::mangleType
   Out << "@@";
 }
 
-void MicrosoftCXXNameMangler::mangleType(const ExtVectorType *T, Qualifiers,
-                                         SourceRange Range) {
-  DiagnosticsEngine &Diags = Context.getDiags();
-  unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error,
-    "cannot mangle this extended vector type yet");
-  Diags.Report(Range.getBegin(), DiagID)
-    << Range;
+void MicrosoftCXXNameMangler::mangleType(const ExtVectorType *T,
+                                         Qualifiers Quals, SourceRange Range) {
+  mangleType(static_cast<const VectorType *>(T), Quals, Range);
 }
 void MicrosoftCXXNameMangler::mangleType(const DependentSizedExtVectorType *T,
                                          Qualifiers, SourceRange Range) {

Modified: cfe/trunk/test/CodeGenCXX/mangle-ms-vector-types.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/mangle-ms-vector-types.cpp?rev=243828&r1=243827&r2=243828&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/mangle-ms-vector-types.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/mangle-ms-vector-types.cpp Sat Aug  1 00:51:55 2015
@@ -29,5 +29,9 @@ void foo256i(__m256i) {}
 void foov8hi(__v8hi) {}
 // CHECK: define void @"\01?foov8hi@@YAXT__clang_vec8_F@@@Z"
 
+typedef __attribute__((ext_vector_type(4))) int vi4b;
+void foovi4b(vi4b) {}
+// CHECK: define void @"\01?foovi4b@@YAXT__clang_vec4_H@@@Z"
+
 // Clang does not support vectors of complex types, so we can't test the
 // mangling of them.





More information about the cfe-commits mailing list